/**
 * Post Card Display - 卡片样式
 * Version: 1.1.0 - 增强对比度优化版
 * 
 * 使用主题CSS变量，自动适配日间/夜间模式：
 * 
 * 日间模式 (默认):
 * --key-color: #333 (主要文字颜色，最深)
 * --main-color: #4e5358 (次要文字颜色)
 * --muted-color: #777 (灰色文字)
 * --body-bg-color: #f5f6f7 (页面背景)
 * --main-bg-color: #fff (卡片背景)
 * --muted-bg-color: #eee (次级背景)
 * --main-border-color: rgba(50,50,50,0.06) (边框)
 * --theme-color: #f04494 (主题色/强调色)
 * 
 * 夜间模式 (.dark-theme):
 * --key-color: #f8fafc (主要文字颜色，最亮)
 * --main-color: #e5eef7 (次要文字颜色)
 * --muted-color: #b4b6bb (灰色文字)
 * --body-bg-color: #292a2d (页面背景)
 * --main-bg-color: #323335 (卡片背景)
 * --muted-bg-color: #2d2e31 (次级背景)
 * --main-border-color: rgba(114,114,114,0.1) (边框)
 * --theme-color: #f04494 (主题色保持一致)
 */

/* 容器样式 - 增强整体对比度 */
.pcd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 为容器添加轻微的背景遮罩，增强卡片对比 */
.pcd-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 100%;
    background: radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0.02) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* 夜间模式下的容器背景 */
.dark-theme .pcd-container::before {
    background: radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.01) 0%,
            transparent 70%);
}

/* 卡片基础样式 - 增强对比度 */
.pcd-card {
    background: var(--main-bg-color, #fff);
    border: 2px solid var(--main-border-color, #e5e5e5);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: visible;
    /* transition 已移除，卡片完全静态 */
    /* 增强阴影效果，提高层次感 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    /* 不设置z-index，避免创建层叠上下文导致下拉菜单被遮挡 */
}

/* 为卡片添加更强的背景层 */
.pcd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 1) 100%);
    z-index: -1;
    pointer-events: none;
    border-radius: 12px;
}

/* 光晕效果已移除 */

/* 夜间模式下的卡片背景强化 */
.dark-theme .pcd-card::before {
    background: linear-gradient(135deg,
            rgba(50, 51, 53, 0.98) 0%,
            rgba(50, 51, 53, 1) 100%);
}

/* 悬停效果已完全禁用 */

/* 卡片头部 - 增强对比度 */
.pcd-card-header {
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.08) 0%,
            rgba(240, 68, 148, 0.08) 100%);
    border-bottom: 2px solid var(--main-border-color, #e5e5e5);
    padding: 15px 20px;
    color: var(--key-color, #333);
    /* backdrop-filter: blur(10px); 移除：会创建层叠上下文导致下拉菜单被遮挡 */
    border-radius: 12px 12px 0 0;
}

/* 夜间模式下的卡片头部 */
.dark-theme .pcd-card-header {
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.12) 0%,
            rgba(240, 68, 148, 0.12) 100%);
}

.pcd-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.pcd-card-header h3 i {
    margin-right: 8px;
}

/* 卡片主体 - 增强背景 */
.pcd-card-body {
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 0 12px 12px;
}

/* 夜间模式下的卡片主体 */
.dark-theme .pcd-card-body {
    background: rgba(50, 51, 53, 0.4);
}

/* 基本信息卡片样式 */
.pcd-info-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 12px;
    border-bottom: 1px solid var(--main-border-color, #f0f0f0);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    margin-bottom: 8px;
    /* transition 已移除 */
}

.pcd-info-item:last-child {
    border-bottom: 1px solid var(--main-border-color, #f0f0f0);
}

/* 悬停效果已禁用 */

/* 夜间模式下的信息项 */
.dark-theme .pcd-info-item {
    background: rgba(40, 41, 43, 0.4);
}

/* 夜间模式悬停效果已禁用 */

.pcd-label {
    font-weight: 600;
    color: var(--key-color, #333);
    min-width: 100px;
    display: flex;
    align-items: center;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 夜间模式下的标签 */
.dark-theme .pcd-label {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.pcd-value {
    color: var(--main-color, #555);
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

.pcd-service-item .pcd-value {
    color: var(--key-color, #333);
    font-weight: 500;
}

.pcd-price-item {
    background: linear-gradient(135deg,
            rgba(240, 68, 148, 0.05) 0%,
            rgba(240, 68, 148, 0.08) 100%);
    padding: 15px !important;
    border-radius: 8px;
    margin-top: 10px;
    border: 2px solid rgba(240, 68, 148, 0.2) !important;
    box-shadow: 0 2px 8px rgba(240, 68, 148, 0.1);
}

/* 夜间模式下的价格项 */
.dark-theme .pcd-price-item {
    background: linear-gradient(135deg,
            rgba(240, 68, 148, 0.1) 0%,
            rgba(240, 68, 148, 0.15) 100%);
    border-color: rgba(240, 68, 148, 0.3) !important;
}

.pcd-price {
    color: var(--theme-color, #f04494);
    font-size: 18px !important;
    font-weight: 600;
}

/* 图标样式 - 简洁版，不使用emoji */
.pcd-icon {
    display: none;
}

/* 联系方式卡片 */
.pcd-contact-content {
    font-size: 15px;
    color: var(--key-color, #333);
    line-height: 1.8;
    padding: 20px;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.06) 0%,
            rgba(102, 126, 234, 0.1) 100%);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

/* 夜间模式下的联系方式内容 */
.dark-theme .pcd-contact-content {
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.12) 0%,
            rgba(102, 126, 234, 0.18) 100%);
    border-color: rgba(102, 126, 234, 0.25);
}

/* 联系方式包装器 */
.pcd-contact-wrapper {
    width: 100%;
}

/* VIP会员权限提示 */
.pcd-contact-permission {
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    padding: 0;
    margin-bottom: 10px;
    color: var(--key-color, #333);
}

/* 夜间模式下的权限提示 */
.dark-theme .pcd-contact-permission {
    color: var(--key-color, #e0e0e0);
}

/* 联系项目列表容器 */
.pcd-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 单个联系项 */
.pcd-contact-item {
    padding: 8px 0;
    font-size: 14px;
    color: var(--main-color, #666);
    text-align: left;
    line-height: 1.8;
}

/* 体验卡片 */
.pcd-experience-content {
    font-size: 14px;
    color: var(--main-color, #666);
    line-height: 1.8;
    padding: 20px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(245, 245, 245, 0.9) 100%);
    border-radius: 8px;
    text-indent: 2em;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 夜间模式下的体验内容 */
.dark-theme .pcd-experience-content {
    background: linear-gradient(135deg,
            rgba(40, 41, 43, 0.8) 0%,
            rgba(35, 36, 38, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* 详情卡片（隐藏内容） */
.pcd-details-card {
    /* 使用和图片卡片一样的彩色渐变 */
}

.pcd-details-card .pcd-card-header {
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.08) 0%,
            rgba(240, 68, 148, 0.08) 100%);
}

/* 夜间模式下的详情卡片头部 */
.dark-theme .pcd-details-card .pcd-card-header {
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.12) 0%,
            rgba(240, 68, 148, 0.12) 100%);
}

.pcd-details-content {
    font-size: 14px;
    color: var(--main-color, #666);
    line-height: 1.8;
    display: block;
}

/* 详情包装器 - 去掉绿色，使用简洁风格 */
.pcd-details-wrapper {
    width: 100%;
    padding: 20px;
    display: block;
}

/* 夜间模式下的详情包装器 */
.dark-theme .pcd-details-wrapper {
    /* 保持一致，不需要特殊样式 */
}

/* VIP会员权限提示（详情卡片） */
.pcd-details-permission {
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    padding: 12px 20px;
    margin-bottom: 20px !important;
    display: block !important;
    width: 100%;
    color: var(--key-color, #333);
}

/* 夜间模式下的详情权限提示 */
.dark-theme .pcd-details-permission {
    color: var(--key-color, #f0e0a0);
}

/* 详情文本内容 - 简洁风格，去掉青色/绿色 */
.pcd-details-text {
    display: block !important;
    margin-top: 0 !important;
    width: 100%;
    font-size: 14px;
    color: var(--main-color, #555);
    line-height: 1.8;
    text-align: left;
}

/* 夜间模式下的详情文本 */
.dark-theme .pcd-details-text {
    color: var(--main-color, #d0d0d0);
}

/* 图片卡片 */
.pcd-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.pcd-image-item {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
    background: linear-gradient(135deg,
            rgba(240, 240, 240, 1) 0%,
            rgba(250, 250, 250, 1) 100%);
    border: 3px solid rgba(0, 0, 0, 0.1);
    /* 增强图片框的阴影，提高对比度 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    /* transition 已移除 */
}

/* 夜间模式下的图片框 */
.dark-theme .pcd-image-item {
    background: linear-gradient(135deg,
            rgba(45, 46, 49, 1) 0%,
            rgba(40, 41, 44, 1) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 图片悬停效果已禁用 */

.pcd-thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    cursor: default;
    /* 增强图片对比度和亮度 */
    filter: brightness(1.02) contrast(1.08) saturate(1.05);
}

/* 灯箱样式 */
.pcd-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(8px);
    overflow: auto;
}

.pcd-lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    filter: brightness(1.05) contrast(1.08);
}

.pcd-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pcd-close:hover,
.pcd-close:focus {
    color: var(--theme-color, #f04494);
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.pcd-prev,
.pcd-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    user-select: none;
    z-index: 100000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.pcd-prev {
    left: 20px;
}

.pcd-next {
    right: 20px;
}

.pcd-prev:hover,
.pcd-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: var(--theme-color, #f04494);
    color: var(--theme-color, #f04494);
    transform: scale(1.1);
}

.pcd-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pcd-container {
        padding: 10px;
    }

    .pcd-card {
        margin-bottom: 15px;
    }

    .pcd-card-header h3 {
        font-size: 16px;
    }

    .pcd-card-body {
        padding: 15px;
    }

    .pcd-label {
        min-width: 80px;
        font-size: 13px;
    }

    .pcd-value {
        font-size: 13px;
    }

    .pcd-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .pcd-price {
        font-size: 18px !important;
    }

    .pcd-prev,
    .pcd-next {
        font-size: 30px;
        padding: 10px;
    }

    .pcd-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
}

/* 动画效果 - 简化版 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pcd-card {
    animation: fadeIn 0.3s ease-out;
}

/* 全局优化：增强所有卡片文字的清晰度 */
.pcd-container * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 为所有卡片内容添加轻微的背景隔离 */
/* .pcd-card-body > * {
    position: relative;
} */

/* 增强夜间模式下的整体对比度 */
.dark-theme .pcd-card {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 夜间模式卡片悬停效果已禁用 */

/* 
 * 下拉菜单层叠问题解决方案：
 * 1. 卡片不设置z-index，避免创建独立的层叠上下文
 * 2. 卡片头部和主体使用static定位，不创建新的层叠上下文
 * 3. 下拉菜单保持默认的z-index（主题已设置为1000），足够显示在卡片上方
 */
.pcd-card-header,
.pcd-card-body {
    position: static;
}