/* * 前台全局样式表 - 极简/呼吸感/响应式
 */

:root {
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-main: #262626;
    --text-muted: #8e8e8e;
    --accent-color: #0095f6;
    --border-color: #efefef;
    --grid-gap: 28px;
    --radius: 12px;
    /* 定义统一的侧边距：移动端通常 15-20px，PC端可根据需求调整 */
    --content-gap: 20px; 
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
}

/* 顶部导航 */
header {
    background: var(--card-bg);
    border-bottom: 0px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
}

.admin-header .container {
    max-width: 975px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 主容器间距 */
.container {
    max-width: 975px;
    margin: 30px auto; /* 顶部留出呼吸空间 */
    padding: 0 20px;
}

/* --- 首页：照片墙网格 --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap); /* 统一的间距，更有秩序感 */
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #eee;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); /* 极轻的阴影，提升质感 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-4px); /* 悬停微动 */
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

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

/* 多图标识器 */
.multi-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px); /* 磨砂玻璃效果 */
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 详情页：帖子展示 --- */
/* 1. 统一文章主容器 */
.post-detail {
    max-width: 800px; /* 或者你喜欢的宽度，如 700px */
    margin: 0 auto;
    padding: 0 20px; /* 这里是全局对齐的关键边距 */
}

/* 2. 调整图片列表，确保图片不溢出容器 */
.post-images-list {
    width: 100%;
    margin-bottom: 25px;
}

.post-images-list img {
    display: block;
    width: 100%;      /* 让图片占满父容器宽度 */
    height: auto;
    margin-bottom: 10px; /* 每张图片之间的垂直间距 */
    border-radius: 4px; /* 可选：增加微小圆角提升精致感 */
}

/* 3. 调整文字内容区，移除多余边距 */
.post-content-area {
    padding: 0; /* 移除可能的内边距，依靠父级容器对齐 */
    margin-bottom: 30px;
    text-align: left;
    line-height: 1.6;
}

/* 4. 调整底部导航栏 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0; /* 仅保留上下边距 */
    border-top: 1px solid #efefef;
    margin-top: 20px;
}

/* 移动端适配：缩小全局边距 */
@media (max-width: 600px) {
    .post-detail {
        padding: 0 15px; 
    }
}
/* --- 文章详情页链接统一优化 --- */

/* 1. 全局去除下划线 (如果之前没加) */
.post-detail a {
    text-decoration: none !important;
    transition: color 0.2s ease-in-out;
}

/* 2. 统一颜色：保持与全局文字颜色一致（或设为你想要的主色调） */
.post-detail a, 
.post-navigation a {
    color: #262626; /* 这里设为深黑色，看起来更高级 */
}

/* 3. 悬停效果：建议改为蓝色或稍微变淡 */
.post-detail a:hover, 
.post-navigation a:hover {
    color: #0095f6; /* Instagram 风格的经典蓝色 */
    text-decoration: none !important;
}

/* 4. 针对 SVG 箭头的颜色处理 */
.nav-arrow svg {
    stroke: currentColor; /* 使 SVG 边框颜色自动继承 a 标签的文字颜色 */
    transition: transform 0.2s ease;
}

.nav-arrow:hover svg {
    stroke: #0095f6;
    transform: scale(1.1); /* 悬停时箭头略微放大，增加交互感 */
}

/* 5. 针对返回首页的文字额外优化 */
.nav-back {
    font-size: 14px;
    font-weight: 500;
}
/* --- 导航箭头平滑动效优化 --- */

.nav-controls {
    display: flex;
    gap: 15px; /* 箭头之间的间距 */
    align-items: center;
}

.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;  /* 给箭头一个固定的点击区域 */
    height: 32px;
    color: #8e8e8e; /* 初始颜色较浅，实现淡入感 */
    opacity: 0.7;   /* 初始透明度 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* 使用贝塞尔曲线使动画更平滑 */
    text-decoration: none !important;
}

.nav-arrow svg {
    stroke: currentColor;
    stroke-width: 2.2; /* 稍微调细一点点，更精致 */
    transition: transform 0.4s ease;
}

/* 悬停时的“淡入”和“位移”效果 */
.nav-arrow:hover {
    color: #0095f6;  /* 变为全局主色（蓝色） */
    opacity: 1;      /* 透明度变为 1，实现淡入效果 */
    transform: translateY(-2px); /* 悬停时轻微上浮 */
}

/* 针对左右箭头的微动效：指向性增强 */
.nav-arrow[title="上一篇"]:hover svg {
    transform: translateX(-3px); /* 悬停时向左微动 */
}

.nav-arrow[title="下一篇"]:hover svg {
    transform: translateX(3px);  /* 悬停时向右微动 */
}

/* 点击时的缩放反馈 */
.nav-arrow:active {
    transform: scale(0.9);
    transition: all 0.1s; /* 点击反馈要快 */
}


/* 页脚 *//* --- 前台页脚链接专项优化 --- */

.site-footer {
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid #efefef;
    text-align: center;
    color: #8e8e8e; /* 页脚文字通常使用较淡的灰色 */
    font-size: 13px;
}

/* 统一页脚链接颜色并去掉下划线 */
.site-footer a {
    color: #8e8e8e; /* 初始颜色与文字一致 */
    text-decoration: none !important; /* 强制去除下划线 */
    margin: 0 10px;
    transition: color 0.2s ease;
}

/* 悬停效果：建议与网站主色调一致（如黑色或蓝色） */
.site-footer a:hover {
    color: #262626; /* 悬停时变深 */
    text-decoration: none !important;
}

/* 如果你的全局主色是蓝色，可以使用这个： */
/* .site-footer a:hover { color: #0095f6; } */

/* 针对移动端的间距微调 */
@media (max-width: 600px) {
    .footer-links {
        margin-top: 10px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .site-footer a {
        margin: 0;
    }
}



/* --- 响应式适配 --- */
@media (max-width: 768px) {
    .container {
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .photo-grid {
        gap: 4px; /* 移动端间距变窄，利用屏幕空间 */
    }

    .image-wrapper {
        border-radius: 4px; /* 移动端圆角调小 */
    }

    .admin-header .container {
        padding: 0 15px;
    }
}

/* 滚动条平滑 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}
