/* ContentPost 详情页样式 */

/* 毛玻璃背景效果 - 清晰原图 */
.post-detail-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.post-detail-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(1.5px) brightness(0.95);
    transform: scale(1.02);
}

.post-detail-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.3) 0%,    /* 顶部稍微暗一点 */
        rgba(0, 0, 0, 0.2) 50%,   /* 中间更透明 */
        rgba(0, 0, 0, 0.3) 100%   /* 底部稍微暗一点 */
    );
}

/* 内容卡片 */
.content-card {
    background: rgba(248, 248, 250, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.sidebar-card {
    background: rgba(248, 248, 250, 0.93);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* 富文本内容样式 */
.content-body {
    color: #374151;
    line-height: 1.8;
}

.content-body p {
    margin-bottom: 1.25rem;
}

.content-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-body ul,
.content-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.content-body a {
    color: #ec4899;
    text-decoration: underline;
    transition: color 0.2s;
}

.content-body a:hover {
    color: #db2777;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.content-body blockquote {
    border-left: 4px solid #ec4899;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

.content-body strong {
    font-weight: 600;
    color: #1f2937;
}

.content-body em {
    font-style: italic;
}

.content-body code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.content-body pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-body pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* 灯箱样式 */
#lightbox {
    backdrop-filter: blur(4px);
}

#lightbox img {
    transition: transform 0.2s ease-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#lightbox-thumbs {
    scrollbar-width: thin;
    scrollbar-color: #ec4899 transparent;
}

#lightbox-thumbs::-webkit-scrollbar {
    height: 6px;
}

#lightbox-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

#lightbox-thumbs::-webkit-scrollbar-thumb {
    background-color: #ec4899;
    border-radius: 3px;
}

/* 图片网格悬停效果 */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    /* 完全不设置image-rendering，让浏览器使用默认高质量算法 */
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
    pointer-events: none;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 侧边栏固定 */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content-body {
        font-size: 0.9375rem;
    }
    
    .content-body h2 {
        font-size: 1.25rem;
    }
    
    .content-body h3 {
        font-size: 1.125rem;
    }
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

