/* --- 面包屑导航样式 --- */
.breadcrumb {
    background: #fff;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    font-size: 0.9em;
}

.breadcrumb-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.breadcrumb a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #007bff;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 5px;
}

.breadcrumb-current {
    color: #007bff;
    font-weight: 500;
}

/* --- General & Blog Layout --- */
html {
    scroll-behavior: smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
header {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    text-decoration: none;
    color: #0056b3;
    transition: color 0.2s ease;
}
.logo a:hover {
    color: #007bff;
}
nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.2s ease;
}
nav a:hover {
    color: #007bff;
}
nav a.active {
    color: #007bff;
    font-weight: 600;
}
.main-container {
    max-width: 1140px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start; /* 【新增】防止侧边栏在内容少时被强制拉伸到与左侧等高 */
}
.single-post-container {
    max-width: 1140px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 修复布局bug: 主内容区占满剩余空间，侧边栏固定宽度 */
.main-container main {
    flex: 1;
    min-width: 0;
}

/* 侧边栏固定320px宽度 */
aside {
    flex: 0 0 320px;
}

/* 【优化】侧边栏容器添加过渡效果，减少布局跳变的视觉影响 */
aside {
    transition: all 0.3s ease;
}

/* 【优化】为天气小部件设置最小高度，防止加载时布局跳动 */
.weather-widget {
    min-height: 450px;
}

.post-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.post-card h2 {
    margin-top: 0;
    color: #333;
}
.post-card h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}
.post-card h2 a:hover {
    color: #007bff;
}
.post-meta {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 10px;
}
.read-more {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}
.widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.widget h3 {
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-size: 1.2rem;
}
.tags .tag {
    display: inline-block;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px;
    font-size: 0.9em;
}
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #6c757d;
    font-size: 0.9em;
}

/* --- Post Full View Styles --- */
.post-full {
    background: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.post-full-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.post-full-title {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1.3;
}

.post-full-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

.post-full-content p,
.post-full-content ol,
.post-full-content ul,
.post-full-content pre {
    margin-bottom: 1.5em;
}

.post-full-content pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.4;
}

.post-full-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

/* --- Weather Widget Styles (Integrated) --- */
.weather-widget h4 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* 【修改】给实时天气增加最小高度和居中占位 */
#weather-now {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: min-height 0.3s ease;
}
/* 【修改】给加载中的提示文字加点颜色，看起来不那么突兀 */
#weather-now p {
    text-align: center;
    color: #888;
}

/* 【优化】给未来预报增加最小高度占位 */
#weather-forecast {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 5px 0;
    min-height: 110px;
    align-items: center;
    transition: min-height 0.3s ease;
}
#weather-forecast p {
    width: 100%;
    text-align: center;
    color: #888;
}

/* 【修改】给未来预报增加最小高度占位 */
#weather-forecast {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 5px 0;
    min-height: 110px;
    align-items: center;
}
#weather-forecast p {
    width: 100%;
    text-align: center;
    color: #888;
}

.forecast-day {
    border: 1px solid #eee;
    padding: 10px;
    margin-right: 10px;
    border-radius: 8px;
    text-align: center;
    flex: 0 0 80px; 
    font-size: 0.85em;
}
.forecast-day:last-child {
    margin-right: 0;
}
.forecast-day p {
    margin: 4px 0;
}
.weather-now-main {
    display: flex;
    align-items: center;
    background-color: #f0f7ff;
    padding: 15px;
    border-radius: 8px;
}
.weather-now-main i {
    font-size: 3rem;
    margin-right: 15px;
    color: #007bff;
}
.weather-now-temp .temp {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
}
.weather-now-temp .text {
    font-size: 1rem;
    color: #555;
}
.weather-now-details {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 8px;
    margin-top: 15px;
    padding: 0 5px;
}
.weather-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}
.weather-detail-item strong {
    color: #666;
    font-weight: normal;
}
.weather-detail-item:last-child {
    border-bottom: none;
}
.obs-time {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
    margin-top: 10px;
}

/* --- Photo Gallery Styles --- */
.photo-gallery {
    column-width: 320px; 
    column-gap: 25px; 
}
.photo-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    display: inline-block; 
    width: 100%; 
    break-inside: avoid; 
    margin-bottom: 25px; 
}
.photo-card img {
    width: 100%;
    display: block;
}
.exif-info {
    padding: 15px;
    font-size: 0.85em;
    color: #555;
    background-color: #fafafa;
    border-top: 1px solid #eee;
    line-height: 1.6;
}

/* =========================================
   移动端响应式适配 (手机及小尺寸平板)
========================================= */
@media (max-width: 768px) {
    /* 1. 将主容器从左右排列改为上下垂直堆叠 */
    .main-container {
        flex-direction: column;
        gap: 20px; /* 上下元素之间的间距稍微缩小一点 */
    }

    /* 2. 取消文章列表的固定或自适应宽度，强制占满屏幕 */
    main {
        flex: auto;
        width: 100%;
    }

    /* 3. 取消侧边栏（天气面板）的固定宽度，强制占满屏幕 */
    aside {
        flex: auto;
        width: 100%;
        min-width: 0;
    }

    /* 4. 优化头部导航栏，防止在极窄屏幕上挤到一起 */
    .header-inner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    nav a {
        margin: 0 10px; /* 减小导航链接之间的间距 */
    }

    /* 5. 调整文章卡片内边距，给小屏幕留出更多空间 */
    .post-full, .post-card, .widget {
        padding: 15px;
    }
}