/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f8fafd;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', sans-serif;
    color: #1e2f3e;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 头部区域 ========== */
.header {
    text-align: center;
    padding: 32px 0 20px;
    border-bottom: 1px solid rgba(100, 108, 140, 0.12);
    margin-bottom: 28px;
    background: transparent;
    position: relative;
}

.logo-text {
    font-size: 2rem;
    font-weight: 620;
    letter-spacing: -0.5px;
    color: #1a2c3e;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.logo-text .soft {
    font-weight: 450;
    background: linear-gradient(135deg, #6c7a8e, #8b9bb0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo-text .accent {
    background: linear-gradient(135deg, #7c6bcb, #a07bcb, #c47bcb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 650;
    position: relative;
}

.logo-text .accent::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c6bcb, #c47bcb);
    border-radius: 2px;
    opacity: 0.3;
    transform: scaleX(0.8);
}

.subhead {
    font-size: 0.75rem;
    color: #8d9db0;
    margin-top: 8px;
    letter-spacing: 0.3px;
    font-weight: 400;
    opacity: 0.85;
}

/* ========== 导航栏 ========== */
.nav-bar-wrapper {
    position: relative;
    margin: 20px 0 6px;
}

.nav-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 6px 20px;
    padding: 4px 0 12px;
    white-space: nowrap;
    scroll-behavior: smooth;
    justify-content: center;
}

.nav-bar::-webkit-scrollbar {
    height: 3px;
}

.nav-bar::-webkit-scrollbar-track {
    background: #eef2f8;
    border-radius: 10px;
}

.nav-bar::-webkit-scrollbar-thumb {
    background: #cbd8e8;
    border-radius: 10px;
}

.nav-bar a {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 480;
    color: #4a5c72;
    padding: 6px 2px;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
    position: relative;
}

.nav-bar a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c6bcb, #a07bcb);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-bar a:hover {
    color: #5f6dc4;
}

.nav-bar a:hover::before {
    width: 100%;
}

.nav-bar a.active {
    color: #5f6dc4;
    font-weight: 540;
}

.nav-bar a.active::before {
    width: 100%;
    background: linear-gradient(90deg, #7c6bcb, #a07bcb);
}

/* ========== 瀑布流样式 ========== */
.waterfall-list {
    column-count: 3;
    column-gap: 18px;
    margin: 20px 0 40px;
}

.pic-card {
    break-inside: avoid;
    margin-bottom: 18px;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    position: relative;
    animation: fadeSlideUp 0.4s cubic-bezier(0.2, 0.9, 0.4, 1) backwards;
    animation-delay: calc(var(--index, 0) * 0.03s);
}

.pic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 24px -12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.02);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.card-img {
    width: 100%;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    background: linear-gradient(110deg, #eceff4 8%, #f5f7fa 18%, #eceff4 33%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

.card-img.loaded {
    animation: none;
    background: none;
    opacity: 1;
}

.pic-card:hover .card-img {
    transform: scale(1.03);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-meta {
    padding: 14px 14px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-bottom: none;
}

.category-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: #7e8c9f;
    background: #f5f7fc;
    padding: 4px 12px;
    border-radius: 30px;
    letter-spacing: 0.2px;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tag i {
    font-size: 0.65rem;
    color: #9aabbf;
}

.pic-card:hover .category-tag {
    background: #f0f3fe;
    color: #5f6dc4;
}

.like-count {
    font-size: 0.7rem;
    color: #a6b4c8;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.like-count i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.pic-card:hover .like-count i {
    transform: scale(1.1);
    color: #e897a8;
}

.pic-title {
    padding: 4px 14px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    transition: color 0.2s;
    letter-spacing: -0.2px;
}

.pic-card:hover .pic-title {
    color: #5f6dc4;
}

/* ========== 分页样式 ========== */
.pagination {
    text-align: center;
    margin: 28px 0 42px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 480;
    text-decoration: none;
    background: #ffffff;
    color: #5c6f87;
    border: 1px solid #e4eaf2;
    transition: all 0.25s ease;
    cursor: pointer;
}

.pagination a:hover {
    background: #5f6dc4;
    color: #fff;
    border-color: #5f6dc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(95, 109, 196, 0.2);
}

.pagination .current {
    background: linear-gradient(135deg, #5f6dc4, #7c6bcb);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(95, 109, 196, 0.25);
}

.pagination .disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
    background: #fafcff;
}

/* ========== 底部版权 ========== */
.footer {
    text-align: center;
    padding: 28px 20px 32px;
    border-top: 1px solid #eef3fc;
    font-size: 0.72rem;
    color: #8b9ab0;
    background: linear-gradient(to bottom, #fafdff, #ffffff);
    margin-top: 16px;
}

.footer a {
    color: #7c8db0;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 470;
}

.footer a:hover {
    color: #5f6dc4;
    text-decoration: underline;
}

.footer p:first-child {
    margin-bottom: 6px;
}

/* ========== 返回顶部 ========== */
.go-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    width: 42px;
    height: 42px;
    border-radius: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(149, 165, 200, 0.2);
    color: #6f7ea0;
    font-size: 1.1rem;
    z-index: 999;
}

.go-top.show {
    opacity: 1;
    visibility: visible;
}

.go-top:hover {
    background: #fff;
    color: #5f6dc4;
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 12px 24px -8px rgba(95, 109, 196, 0.25);
}

/* ========== 内容页样式 ========== */
.article-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    margin: 20px 0 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.article-breadcrumb {
    padding: 20px 28px 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: #8d9db0;
}

.breadcrumb-list a {
    color: #7e8c9f;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-list a:hover {
    color: #5f6dc4;
}

.breadcrumb-list i {
    font-size: 0.7rem;
    color: #cbd5e1;
}

.breadcrumb-current {
    color: #5f6dc4;
}

.breadcrumb-update {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e2f3e;
    padding: 16px 28px 8px;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.article-title .edit-link {
    font-size: 0.9rem;
    color: #8d9db0;
    margin-left: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.article-title .edit-link:hover {
    color: #5f6dc4;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 8px 28px 20px;
    border-bottom: 1px solid #f0f3fa;
    font-size: 0.75rem;
    color: #9aabbf;
}

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

.article-meta i {
    font-size: 0.7rem;
    color: #b1bed6;
}

.article-content {
    padding: 28px 28px 20px;
    font-size: 1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 1.2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.article-content h2,
.article-content h3 {
    margin: 1.5em 0 0.8em;
    color: #1e2f3e;
    font-weight: 600;
}

.article-content h2 { font-size: 1.4rem; }
.article-content h3 { font-size: 1.2rem; }

.article-content ul,
.article-content ol {
    margin: 1em 0 1em 2em;
}

.article-content li {
    margin: 0.5em 0;
}

.article-content a {
    color: #5f6dc4;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: #5f6dc4;
}

.article-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: #f8fafd;
    border-left: 4px solid #5f6dc4;
    border-radius: 8px;
    color: #5a6b84;
    font-style: italic;
}

.article-like {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f7fc;
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 20px 0 24px;
    border: none;
    font-size: 0.85rem;
}

.article-like:hover {
    background: #f0f3fe;
    transform: translateY(-2px);
}

.article-like i,
.article-like span,
.article-like b {
    color: #5f6dc4;
}

.article-like b {
    font-weight: 600;
}

.article-footer {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #f0f3fa;
}

.article-url {
    margin-bottom: 16px;
    font-size: 0.8rem;
    word-break: break-all;
}

.article-url span {
    color: #8d9db0;
}

.article-url a {
    color: #5f6dc4;
    text-decoration: none;
}

.article-url a:hover {
    text-decoration: underline;
}

.article-share {
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid #f0f3fa;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.share-label {
    color: #8d9db0;
    font-size: 0.8rem;
}

.share-buttons a {
    color: #9aabbf;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 1.2rem;
    cursor: pointer;
}

.share-buttons a:hover {
    color: #5f6dc4;
    transform: translateY(-2px);
}

/* 微信分享弹窗 */
.weixin-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.weixin-popup.show {
    visibility: visible;
    opacity: 1;
}

.weixin-popup-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 280px;
    width: 90%;
}

.weixin-popup-content img {
    width: 180px;
    height: 180px;
    margin: 10px auto;
    display: block;
}

.weixin-popup-content p {
    margin-top: 15px;
    color: #666;
    font-size: 0.85rem;
}

.close-weixin {
    margin-top: 15px;
    padding: 8px 20px;
    background: #5f6dc4;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
}

.close-weixin:hover {
    background: #4a56a3;
}

/* 复制成功提示 */
.copy-tip {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.8rem;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-tip.show {
    opacity: 1;
}

/* 猜你喜欢区域 */
.related-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e2f3e;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f3fa;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #7c6bcb, #a07bcb);
    border-radius: 2px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-item {
    transition: transform 0.2s;
}

.related-item:hover {
    transform: translateY(-4px);
}

.related-img {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
    margin-bottom: 10px;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-item:hover .related-img img {
    transform: scale(1.05);
}

.related-item p {
    font-size: 0.8rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item a {
    text-decoration: none;
    color: inherit;
}

/* 评论区域 */
.comment-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cfddea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b2c3d8;
}

/* ========== 响应式布局 ========== */
@media (min-width: 992px) and (max-width: 1199px) {
    .main-wrap {
        max-width: 960px;
    }
    .waterfall-list {
        column-gap: 16px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .main-wrap {
        max-width: 720px;
    }
    .waterfall-list {
        column-count: 2;
        column-gap: 18px;
    }
}

@media (max-width: 767px) {
    .main-wrap {
        max-width: 100%;
        padding: 0 14px;
    }
    
    .header {
        padding: 24px 0 14px;
        margin-bottom: 20px;
    }
    
    .logo-text {
        font-size: 1.6rem;
    }
    
    .subhead {
        font-size: 0.68rem;
    }
    
    .waterfall-list {
        column-count: 2;
        column-gap: 12px;
        margin: 16px 0 32px;
    }
    
    .pic-card {
        margin-bottom: 12px;
        border-radius: 14px;
    }
    
    .card-meta {
        padding: 10px 10px 6px;
    }
    
    .category-tag {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    
    .like-count {
        font-size: 0.6rem;
    }
    
    .pic-title {
        padding: 2px 10px 12px;
        font-size: 0.72rem;
    }
    
    .pagination {
        gap: 6px;
        margin: 20px 0 32px;
    }
    
    .pagination a, .pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.72rem;
        border-radius: 8px;
    }
    
    .go-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    
    .footer {
        padding: 20px 16px 24px;
        font-size: 0.65rem;
    }
    
    .nav-bar {
        justify-content: flex-start;
        gap: 5px 16px;
    }
    .nav-bar a {
        font-size: 0.78rem;
        padding: 5px 2px;
    }
    
    /* 内容页响应式 */
    .article-detail {
        padding: 0 16px;
    }
    .article-title {
        font-size: 1.4rem;
        padding: 12px 20px 6px;
    }
    .article-breadcrumb {
        padding: 16px 20px 0;
    }
    .article-content {
        padding: 20px 20px 16px;
    }
    .related-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .related-section,
    .comment-section {
        padding: 20px;
    }
    .breadcrumb-update {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .waterfall-list {
        column-gap: 10px;
    }
    .pic-card {
        margin-bottom: 10px;
    }
    .card-meta {
        padding: 8px 8px 4px;
    }
    .pic-title {
        padding: 0 8px 10px;
        font-size: 0.68rem;
    }
    .nav-bar {
        gap: 5px 12px;
    }
    .nav-bar a {
        font-size: 0.72rem;
    }
    
    /* 内容页响应式 */
    .article-title {
        font-size: 1.2rem;
    }
    .related-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}