:root {
    /* 核心色板 - 徕卡三原色 */
    --leica-red: #D40000;
    --leica-black: #000000;
    --leica-white: #FFFFFF;
    
    /* 语义化色值 - 浅色模式 */
    --bg: var(--leica-white);
    --fg: var(--leica-black);
    --accent: var(--leica-red);
    --border: rgba(0, 0, 0, 0.08);
    --subtle-bg: #F8F8F8;
    --muted: #888888;
    
    /* 字体族 */
    --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    
    /* 间距与布局 */
    --container-max: 1440px;
    --header-h: 90px;
    --header-h-sm: 60px;
    --ease-dynamic: cubic-bezier(0.19, 1, 0.22, 1); /* 更干脆的机械感 */
}

[data-theme="dark"] {
    --bg: #000000; /* 纯黑 */
    --fg: #FFFFFF;
    --border: rgba(255, 255, 255, 0.15);
    --subtle-bg: #111111;
    --muted: #999999;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.5s var(--ease-dynamic);
}

/* 隐藏滚动条但保留滚动 */
body::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s var(--ease-dynamic);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(10%) contrast(1.05); /* 模拟胶片感 */
}

/* 文章内容图片优化 */
.article-content img {
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
    margin: 20px auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: translateY(-5px);
}

/* Lightbox 样式 */
.leica-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: zoom-out;
}

.leica-lightbox.active {
    display: flex;
    opacity: 1;
}

.leica-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.leica-lightbox.active img {
    transform: scale(1);
}

/* 重点内容高亮 */
.highlight-content {
    color: var(--leica-red);
    font-weight: bold;
    border-bottom: 2px solid var(--leica-red);
    padding-bottom: 2px;
}

/* 重点内容差异化突出 */
.article-content strong,
.article-content b {
    color: var(--accent);
    font-weight: 800;
    position: relative;
    padding: 0 2px;
}

.article-content strong::after,
.article-content b::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent);
    opacity: 0.1;
    z-index: -1;
}
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: 60px;
    padding-right: 60px;
}

@media (max-width: 768px) {
    .container { 
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* 3. 灵动版特有：快门加载动画 */
.shutter-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.shutter-blade {
    flex: 1;
    background: var(--leica-black);
    transition: transform 0.6s var(--ease-dynamic);
}

.shutter-blade:nth-child(1) { transform-origin: top; }
.shutter-blade:nth-child(2) { transform-origin: bottom; }

.shutter-loader.hide .shutter-blade:nth-child(1) { transform: scaleY(0); }
.shutter-loader.hide .shutter-blade:nth-child(2) { transform: scaleY(0); }

/* 6. 进场动画增强 */
.post-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-dynamic);
}

.post-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-img-link {
    display: block;
    overflow: hidden;
    background: var(--subtle-bg);
    margin-bottom: 28px;
    clip-path: inset(0 0 0 0);
    transition: clip-path 1s var(--ease-dynamic);
}

.post-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 1.2s var(--ease-dynamic);
}

.post-card:hover .post-img {
    transform: scale(1.1) rotate(1deg);
}

.post-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    transition: color 0.4s var(--ease-dynamic);
}

.post-card:hover .post-title {
    color: var(--accent);
}

.post-info {
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 12px;
}

.post-category a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
}

.post-category a:hover {
    border-bottom-color: var(--accent);
}

.post-excerpt {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fg);
}

.read-more::after {
    content: '→';
    transition: transform 0.3s var(--ease-dynamic);
}

.read-more:hover {
    color: var(--accent);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* 无封面图模式 - 列表化 */
.post-card.no-thumb {
    grid-column: 1 / -1;
    padding: 60px;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    transition: all 0.4s var(--ease-dynamic);
}

.post-card.no-thumb:hover {
    background: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    transform: translateY(-5px);
}

.post-card.no-thumb .post-title {
    font-size: clamp(28px, 5vw, 42px);
    max-width: 900px;
}

.post-card.no-thumb .post-excerpt {
    max-width: 800px;
    font-size: 17px;
    -webkit-line-clamp: 4;
}

@media (max-width: 768px) {
    .post-card.no-thumb {
        padding: 40px 24px;
        min-height: auto;
    }
}

/* 7. 主体布局 */
main {
    padding-top: calc(var(--header-h) + 80px); /* 稳定间距 */
    min-height: 70vh;
}

/* 7.0 文章详情页样式 */
.article-header {
    margin-bottom: 60px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 50px;
    padding-top: 20px; /* 增加顶部内边距 */
}

.article-header h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    margin: 20px 0;
    letter-spacing: -0.02em;
}

.article-meta {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.article-cover {
    margin: 40px 0 60px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--fg);
    max-width: 900px;
    margin: 0 auto;
}

.article-content p {
    margin-bottom: 30px;
}

.article-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags a {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 15px;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.post-tags a:hover {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    main { padding-top: calc(var(--header-h-sm) + 40px); }
    .hero-banner { padding: 60px 30px; margin-bottom: 60px; }
    .article-header h1 { font-size: 28px; }
    .article-content { font-size: 16px; }
}

/* 7.1 Hero 区域：品牌视觉中心 */
.hero-banner {
    margin-bottom: 100px;
    padding: 120px 80px;
    background: #E8E8E8; /* 徕卡经典的哑光银灰色基调 */
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.02);
}

/* 徕卡红点装饰 */
.hero-banner::before {
    content: 'LEICA';
    position: absolute;
    top: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: var(--leica-red);
    color: #FFF;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(212, 0, 0, 0.2);
    z-index: 2;
    transition: transform 0.3s ease;
}

.hero-banner.has-custom-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-banner.has-custom-bg::after {
    background-image: linear-gradient(to right, 
        #FFF 1px, transparent 1px, 
        transparent 10px, #FFF 1px, transparent 1px
    );
    opacity: 0.6;
}

.hero-banner.has-custom-bg .hero-text h2 {
    color: #FFF;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-banner.has-custom-bg .hero-text p {
    color: rgba(255,255,255,0.8);
    border-left-color: var(--leica-red);
}

.hero-banner.has-custom-bg .hero-text::after {
    color: rgba(255,255,255,0.5);
}

.hero-banner.has-custom-bg::before {
    transform: scale(0.8); /* 有背景图时稍微缩小红点，减少遮挡 */
}

/* 镜头焦距刻度模拟 */
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: linear-gradient(to right, 
        var(--muted) 1px, transparent 1px, 
        transparent 10px, var(--muted) 1px, transparent 1px
    );
    background-size: 80px 15px;
    background-repeat: repeat-x;
    background-position: center bottom 10px;
    opacity: 0.3;
}

[data-theme="dark"] .hero-banner {
    background: #121212;
    border-color: rgba(255,255,255,0.05);
}

.hero-text {
    position: relative;
    z-index: 1;
}

/* 增加镜头参数水印 */
.hero-text::after {
    content: 'SUMMICRON-M 1:2/35 ASPH. E39';
    position: absolute;
    bottom: -60px;
    left: 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.2em;
    opacity: 0.4;
    text-transform: uppercase;
}

.hero-text h2 {
    font-size: clamp(40px, 6vw, 80px); /* 稍微调小一点，增加精致感 */
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: 25px;
    color: var(--fg); /* 移除渐变，使用纯色表现徕卡的机械严谨感 */
    animation: heroFadeIn 1.2s var(--ease-dynamic) both;
}

.hero-text p {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    max-width: 600px;
    padding-left: 20px;
    border-left: 3px solid var(--leica-red); /* 侧边的红色细线，增加品牌感 */
    animation: heroFadeIn 1.2s var(--ease-dynamic) 0.2s both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(40px) skewY(2deg); }
    to { opacity: 1; transform: translateY(0) skewY(0); }
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 50px;
    margin-bottom: 100px;
}

@media (max-width: 768px) {
    .post-grid { grid-template-columns: 1fr; gap: 60px; }
}

.magazine-grid {
    display: flex;
    flex-direction: column;
    gap: 100px;
    margin-bottom: 120px;
}

.magazine-row {
    display: flex;
    flex-direction: column;
}

.magazine-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: stretch; /* 关键：拉伸以对齐高度 */
    margin-bottom: 40px;
}

.featured-image-box {
    width: 100%;
}

.featured-image-box .post-img-link {
    margin-bottom: 0;
    height: 100%;
}

.featured-image-box .post-img {
    height: 100%;
    object-fit: cover;
}

/* 占位图样式 */
.no-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--subtle-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.5em;
    color: var(--border);
    border: 1px solid var(--border);
}

.side-list-wrapper {
    height: 100%;
}

.side-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between; /* 均匀分布，实现高度对齐 */
}

.side-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--ease-dynamic);
}

.side-item:first-child { padding-top: 0; }
.side-item:last-child { border-bottom: none; padding-bottom: 0; }

.side-item:hover {
    padding-left: 10px;
}

.side-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}

.side-item-category a {
    color: var(--accent);
}

.side-item-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.side-item:hover .side-item-title {
    color: var(--accent);
}

/* 底部文字信息区域 */
.featured-info-bottom {
    max-width: 900px;
}

.featured-info-bottom .post-title {
    font-size: clamp(28px, 5vw, 48px);
    margin-bottom: 25px;
}

.featured-info-bottom .post-excerpt {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--muted);
}

@media (max-width: 1024px) {
    .magazine-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .side-list {
        gap: 20px;
    }
}

/* 8. 分页：机械拨盘感 */
.pagination {
    margin: 60px 0 100px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pagination span, 
.pagination a {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 800;
    transition: all 0.3s var(--ease-dynamic);
}

.pagination a:hover {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

