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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #d0dada;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #2c7a7b;
}

/* 图标定义 */
@font-face {
    font-family: 'icons';
    src: local('Lucida Icons'), local('Segoe UI Symbol');
}

.icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
    margin-right: 1px;
    position: relative;
    top: -0.05em;
}

/* 容器 */
.container {
    width: 1100px;
    margin: 20px auto;
    display: flex;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: calc(100vh - 40px);
}

/* 左侧边栏 */
.sidebar-left {
    width: 20.83%;
    flex-shrink: 0;
    background-color: #ebf2ed;
    padding: 20px 15px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-left::-webkit-scrollbar {
    display: none;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 24px;
    color: #2c7a7b;
    margin-bottom: 5px;
}

.logo p {
    font-size: 12px;
    color: #666;
}

.nav-menu {
    list-style: none;
    margin-bottom: 30px;
}

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: #d0e7df;
}

.nav-menu a.current {
    background-color: #5A8F5A;
    color: #fff;
}

.site-info {
    border-top: 1px solid #d0dada;
    padding-top: 20px;
    font-size: 11px;
    color: #666;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
}

.info-icon {
    width: 20px;
    font-size: 14px;
    text-align: center;
}

.info-label {
    width: 30px;
    color: #999;
}

.info-value {
    flex: 1;
    color: #5A8F5A;
    font-weight: 500;
}

.info-copyright {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #d0dada;
    text-align: center;
    color: #999;
}

/* 中间内容栏 */
.main-content {
    width: 54.17%;
    flex-shrink: 0;
    background-color: #f6faf8;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-content::-webkit-scrollbar {
    display: none;
}

/* 悬浮遮罩层 */
.floating-mask {
    position: sticky;
    top: 0;
    height: 60px;
    background: rgba(246, 250, 248, 0.95);
    border-bottom: 1px solid #d0dada;
    padding: 10px 20px;
    z-index: 100;
}

.mask-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 0 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-box input {
    border: none;
    outline: none;
    width: 200px;
    padding: 8px 10px;
    font-size: 14px;
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #2c7a7b;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: rotate(180deg);
}

/* 幻灯片 */
.slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.slider-container {
    display: flex;
    width: 100%;
}

.slider-item {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

.slider-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 30px 20px;
    color: #fff;
}

.slider-overlay h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.slider-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background: #fff;
}

/* 分类页面 */
.category-header {
    padding: 20px;
    border-bottom: 1px solid #d0dada;
    background: #fff;
}

.category-header {
    position: relative;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #ebf2ed;
    border-radius: 0;
    margin: 0;
    overflow: hidden;
}

.category-header .category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.3));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 20px 20px 35px;
}

.category-header h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.category-description {
    font-size: 14px;
    color: #fff;
}

/* 子分类导航 */
.subcategory-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.subcat-item {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.subcat-item:hover {
    background: #e8e8e8;
    color: #333;
}

.subcat-item.active {
    background: #5A8F5A;
    color: #fff;
}

/* 文章列表 */
.post-list {
    padding: 0 5px 20px;
}

.section-title {
    font-size: 18px;
    color: #2c7a7b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c7a7b;
}

.post-item {
    display: flex;
    padding: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #d0dada;
}

.post-thumb {
    flex-shrink: 0;
    width: 150px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.post-title:hover {
    color: #2c7a7b;
}

.post-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.post-excerpt {
    font-size: 13px;
    color: #666;
    flex: 1;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-stats {
    font-size: 12px;
    color: #999;
}

.post-stats span {
    margin-right: 15px;
}

/* 分页 */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.page-nav {
    display: inline-flex;
    list-style: none;
    background: #fff;
    border-radius: 8px;
    padding: 5px;
}

.page-nav li {
    margin: 0 3px;
}

.page-nav a,
.page-nav span {
    display: block;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
}

.page-nav a:hover {
    background: #ebf2ed;
}

.page-nav .current {
    background: #2c7a7b;
    color: #fff;
}

/* 右侧边栏 */
.sidebar-right {
    width: 25%;
    flex-shrink: 0;
    background-color: #ebf2ed;
    padding: 15px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-right::-webkit-scrollbar {
    display: none;
}

.widget {
    margin-bottom: 12px;
    padding: 8px;
}

.widget-title {
    font-size: 15px;
    color: #999;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d0dada;
}

/* 热门阅读 */
.hot-posts {
    list-style: none;
}

.hot-posts li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #d0dada;
}

.hot-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hot-post-item {
    display: flex;
    gap: 10px;
    text-decoration: none;
}

.hot-post-thumb {
    width: 60px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.hot-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.hot-post-title {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.hot-post-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    gap: 8px;
}

.hot-post-item:hover .hot-post-title {
    color: #2c7a7b;
}

/* 最新评论 */
.recent-comments {
    list-style: none;
}

.recent-comments li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #d0dada;
}

.recent-comments li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sidebar-right .comment-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-right .comment-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.sidebar-right .comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.sidebar-right .comment-author-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.sidebar-right .comment-time {
    font-size: 11px;
    color: #999;
}

.sidebar-right .comment-text {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

/* 站点统计 */
.site-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: #f6faf8;
    border-radius: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #2c7a7b;
}

.stat-label {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

/* 文章内容页 */
.post-thumbnail {
    width: 100%;
}

.post-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-header {
    padding: 20px;
    border-bottom: 1px solid #d0dada;
}

.post-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.post-meta-full {
    font-size: 13px;
    color: #666;
}

.post-meta-full span {
    margin-right: 20px;
}

.post-content-full {
    padding: 20px;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.post-content-full img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.post-content-full p {
    margin-bottom: 15px;
}

.post-content-full h2 {
    font-size: 20px;
    color: #2c7a7b;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #d0dada;
}

.post-content-full h3 {
    font-size: 18px;
    color: #333;
    margin: 15px 0;
}

.post-content-full ul,
.post-content-full ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

/* 评论区 */
.comments-area {
    padding: 20px;
    border-top: 1px solid #d0dada;
}

.comments-title {
    font-size: 16px;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
    margin-bottom: 20px;
}

.comment-item {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comments-area .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ebf2ed;
    margin-right: 10px;
}

.comment-meta {
    flex: 1;
}

.comment-author-name {
    font-weight: bold;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comments-area .comment-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* 评论表单 */
.comment-form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d0dada;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2c7a7b;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background: #2c7a7b;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.submit-btn:hover {
    background: #256667;
}

/* 独立页面 */
.page-content {
    padding: 20px;
}

.page-content h1 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c7a7b;
}

.page-content .content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

/* 404页面 */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 h1 {
    font-size: 80px;
    color: #2c7a7b;
    margin-bottom: 20px;
}

.error-404 h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.error-404 p {
    color: #666;
    margin-bottom: 20px;
}

.error-404 .btn {
    display: inline-block;
    background: #2c7a7b;
    color: #fff;
    padding: 10px 30px;
    border-radius: 6px;
}

.error-404 .btn:hover {
    background: #256667;
}

/* 页脚 */
.footer {
    display: none;
}

/* 朋友圈模板 */
.moments-list {
    padding: 20px;
}

.moment-item {
    padding: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.moment-item:last-child {
    border-bottom: none;
}

.moment-main {
    display: flex;
}

.moment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    background: #ebf2ed;
    flex-shrink: 0;
}

.moment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moment-body {
    flex: 1;
    min-width: 0;
}

.moment-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.moment-author {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.moment-time {
    font-size: 12px;
    color: #999;
}

.moment-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.moment-content p {
    margin-bottom: 10px;
}

.moment-images {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.moment-images.images-1 {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.moment-images.images-2 {
    grid-template-columns: repeat(2, 1fr);
}

.moment-images.images-3 {
    grid-template-columns: repeat(3, 1fr);
}

.moment-images.images-4 {
    grid-template-columns: repeat(2, 1fr);
}

.moment-images.images-5,
.moment-images.images-6 {
    grid-template-columns: repeat(3, 1fr);
}

.moment-images.images-7,
.moment-images.images-8,
.moment-images.images-9 {
    grid-template-columns: repeat(3, 1fr);
}

.moment-image {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.moment-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.moment-image:hover img {
    transform: scale(1.05);
}

.moment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: none;
}

.moment-title-tag {
    font-size: 12px;
    color: #2c7a7b;
    font-weight: 500;
}

.moment-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
}

.moment-comment-btn {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.moment-comment-btn:hover {
    color: #2c7a7b;
}

.moment-like {
    display: flex;
    align-items: center;
}

.moment-stats i {
    margin-right: 4px;
}

.moment-like i {
    margin-right: 4px;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 1280px) {
    .container {
        width: 98%;
        margin: 10px auto;
    }
    
    .sidebar-left {
        width: 150px;
    }
    
    .sidebar-right {
        width: 220px;
    }
}