/* Single Post Styles - 单篇文章样式 */

.post {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.post-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.post-content {
    background: #fff;
    padding: 1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 2rem 0 1rem;
    color: #333;
    position: relative;
    padding-left: 20px;
}

.post-content h1:before,
.post-content h2:before,
.post-content h3:before,
.post-content h4:before,
.post-content h5:before,
.post-content h6:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #007bff;
}

.post-content h1:before {
    width: 8px;
    background-color: #007bff;
}

.post-content h2:before {
    width: 6px;
    background-color: #28a745;
}

.post-content h3:before {
    width: 5px;
    background-color: #007bff;
}

.post-content h4:before {
    width: 4px;
    background-color: #ffc107;
}

.post-content h5:before {
    width: 3px;
    background-color: #17a2b8;
}

.post-content h6:before {
    width: 2px;
    background-color: #6c757d;
}

/* 移除原有的底部边框样式 */
/*
.post-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    color: #007bff;
}
*/

.post-content h2 {
    font-size: 1.8rem;
}

.post-content h3 {
    font-size: 1.5rem;
    color: #007bff;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: #555;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Post Navigation Styles - 修复移动端显示问题 */
.post-navigation {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* 电脑端添加左右内边距 */
}

.nav-previous,
.nav-next {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: none;
    height: 80px;
    align-items: stretch;
}

/* Add hover effects */
.nav-previous:hover, .nav-next:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: background 0.3s ease;
}

/* Darken overlay on hover */
.nav-previous:hover .nav-overlay, .nav-next:hover .nav-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.nav-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.nav-content {
    position: relative;
    z-index: 2;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    flex: 1;
    height: 100%;
    align-self: stretch;
}

.nav-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.nav-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.9;
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* Mobile Responsive - 修复移动端导航显示问题 */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px !important; /* 强制添加移动端左右内边距 */
        width: 100% !important;
        margin-top: 1rem !important; /* 在移动端标题和导航之间添加间距 */
    }
    
    /* 修复移动端导航项样式 */
    .post-navigation .nav-previous,
    .post-navigation .nav-next,
    div.post-navigation .nav-previous,
    div.post-navigation .nav-next {
        height: 100px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: stretch !important;
        min-height: 100px !important;
        max-height: 100px !important;
        overflow: hidden !important;
        padding: 0 15px !important;
        margin: 0 !important;
        border: none !important;
        line-height: 1 !important;
    }
    
    /* 确保导航内容正确显示 */
    .nav-content {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        text-align: left !important;
    }
    
    /* 确保导航标题正确显示 */
    .nav-title {
        line-height: 1.2 !important;
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        text-align: left !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-weight: bold !important;
    }
    
    .nav-meta {
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        font-size: 0.8rem !important;
    }
    
    .nav-next {
        text-align: left !important;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: #ffffff;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb .current {
    color: #6c757d;
    font-weight: bold;
}


.related-emojis .section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

/* 修改"查看更多"按钮样式，与首页保持一致 */
.more-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 1px solid #007bff;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.more-link:hover {
    background: #007bff;
    color: white;
}

/* Emoji Grid Styles */
.emoji-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    justify-content: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.emoji-item {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1; /* 确保正方形 */
    min-width: 150px;
    min-height: 150px;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.emoji-item:hover {
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.emoji-character {
    font-size: 64px;
    line-height: 1;
    cursor: pointer;
    user-select: all;
    margin-bottom: 0.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-name {
    font-size: 18px;
    color: #666;
    margin-top: 0.5rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .post-header,
    .post-content {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    /* 使用更具体的选择器确保样式优先级 */
    div.post-navigation .nav-previous,
    div.post-navigation .nav-next {
        max-width: 100%;
        height: 100px !important; /* 添加移动端高度设置并增加优先级 */
        display: flex !important; /* 确保display属性正确设置 */
        align-items: stretch !important; /* 确保在Flexbox中正确填充高度 */
    }
    
    /* 使用最高优先级的选择器 */
        height: 100px !important;
        display: flex !important;
        align-items: stretch !important; /* 确保在Flexbox中正确填充高度 */
        min-height: 100px !important; /* 添加最小高度确保不会被压缩 */
        max-height: 100px !important; /* 添加最大高度确保不会超过 */
        overflow: hidden !important; /* 确保内容不会溢出 */
        padding: 0 !important; /* 移除可能影响高度的padding */
        margin: 0 !important; /* 移除可能影响高度的margin */
        border: none !important; /* 移除可能影响高度的border */
        line-height: 1 !important; /* 确保行高不会影响高度 */
    
    /* 移动端表情网格布局 - 确保一行显示3个表情 */
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 15px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .emoji-item {
        width: 100% !important;
        height: 130px !important;
        aspect-ratio: 1/1 !important;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .emoji-item:hover {
        transform: translateY(-7px) scale(1.06);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
    
    .emoji-character {
        font-size: 48px !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    .breadcrumb {
        margin: 0 0 1rem 0;
    }
    
    /* 确保相关表情推荐和所有表情分类中的表情名称居中并完整显示 */
    .related-emojis .emoji-grid .emoji-item .emoji-name,
    .all-categories .emoji-grid .emoji-item .emoji-name,
    .related-emojis .emoji-name,
    .all-categories .emoji-name {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        font-size: 16px !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
    }
}

@media (max-width: 480px) {
    /* 小屏幕设备也保持一行3个表情，但尺寸略小 */
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
        gap: 10px !important;
        max-width: 100% !important;
    }
    
    .emoji-item {
        width: 100% !important;
        height: 100px !important;
        padding: 0.75rem !important;
        aspect-ratio: 1/1 !important;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 6px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.12);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    
    .emoji-item:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
    
    .emoji-character {
        font-size: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    /* 确保相关表情推荐和所有表情分类中的表情名称在小屏幕上也居中并完整显示 */
    .related-emojis .emoji-grid .emoji-item .emoji-name,
    .all-categories .emoji-grid .emoji-item .emoji-name,
    .related-emojis .emoji-name,
    .all-categories .emoji-name {
        text-align: center !important;
        font-size: 14px !important;
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
    }
}
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 1.5rem;
    margin: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

/* 修改"查看更多"按钮样式，与首页保持一致 */
.more-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 1px solid #007bff;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.more-link:hover {
    background: #007bff;
    color: white;
}

/* Emoji Grid Styles */
.emoji-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    justify-content: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.emoji-item {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1; /* 确保正方形 */
    min-width: 150px;
    min-height: 150px;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.emoji-item:hover {
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.emoji-character {
    font-size: 64px;
    line-height: 1;
    cursor: pointer;
    user-select: all;
    margin-bottom: 0.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-name {
    font-size: 18px;
    color: #666;
    margin-top: 0.5rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .post-header,
    .post-content {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    /* 使用更具体的选择器确保样式优先级 */
    div.post-navigation .nav-previous,
    div.post-navigation .nav-next {
        max-width: 100%;
        height: 100px !important; /* 添加移动端高度设置并增加优先级 */
        display: flex !important; /* 确保display属性正确设置 */
        align-items: stretch !important; /* 确保在Flexbox中正确填充高度 */
    }
    
    /* 使用最高优先级的选择器 */
        height: 100px !important;
        display: flex !important;
        align-items: stretch !important; /* 确保在Flexbox中正确填充高度 */
        min-height: 100px !important; /* 添加最小高度确保不会被压缩 */
        max-height: 100px !important; /* 添加最大高度确保不会超过 */
        overflow: hidden !important; /* 确保内容不会溢出 */
        padding: 0 !important; /* 移除可能影响高度的padding */
        margin: 0 !important; /* 移除可能影响高度的margin */
        border: none !important; /* 移除可能影响高度的border */
        line-height: 1 !important; /* 确保行高不会影响高度 */
    
    /* 移动端表情网格布局 - 确保一行显示3个表情 */
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 15px !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .emoji-item {
        width: 100% !important;
        height: 130px !important;
        aspect-ratio: 1/1 !important;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .emoji-item:hover {
        transform: translateY(-7px) scale(1.06);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
    
    .emoji-character {
        font-size: 48px !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    .breadcrumb {
        margin: 0 0 1rem 0;
    }
    
    /* 确保相关表情推荐和所有表情分类中的表情名称居中并完整显示 */
    .related-emojis .emoji-grid .emoji-item .emoji-name,
    .all-categories .emoji-grid .emoji-item .emoji-name,
    .related-emojis .emoji-name,
    .all-categories .emoji-name {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        font-size: 16px !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
    }
}

@media (max-width: 480px) {
    /* 小屏幕设备也保持一行3个表情，但尺寸略小 */
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
        gap: 10px !important;
        max-width: 100% !important;
    }
    
    .emoji-item {
        width: 100% !important;
        height: 100px !important;
        padding: 0.75rem !important;
        aspect-ratio: 1/1 !important;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 6px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.12);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    
    .emoji-item:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
    
    .emoji-character {
        font-size: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    /* 确保相关表情推荐和所有表情分类中的表情名称在小屏幕上也居中并完整显示 */
    .related-emojis .emoji-grid .emoji-item .emoji-name,
    .all-categories .emoji-grid .emoji-item .emoji-name,
    .related-emojis .emoji-name,
    .all-categories .emoji-name {
        text-align: center !important;
        font-size: 14px !important;
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
    }
}