/**
 * 文章弹窗样式
 * Post Popup Styles
 */

/* 弹窗遮罩层 */
.post-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                visibility 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.post-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 420px;
    min-height: 280px;
    max-height: 80vh;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-popup-container.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* 弹窗头部 */
.post-popup-header {
    padding: 28px 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-popup-title {
    font-size: 22px;
    font-weight: 600;
    color: #555;
    margin: 0;
    text-align: center;
    letter-spacing: 0.3px;
}

/* 弹窗内容 */
.post-popup-content {
    padding: 0 28px 28px;
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    overflow-y: auto;
    flex: 1;
    letter-spacing: 0.3px;
}

.post-popup-content p {
    margin: 0 0 12px 0;
}

.post-popup-content p:last-child {
    margin-bottom: 0;
}

.post-popup-content a {
    color: #555;
    text-decoration: none;
    border-bottom: 1px dashed #ccc;
    transition: all 0.2s ease;
}

.post-popup-content a:hover {
    color: #000;
    border-bottom-color: #000;
}

.post-popup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
}

.post-popup-content ul,
.post-popup-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.post-popup-content li {
    margin: 6px 0;
}

.post-popup-content code {
    background-color: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1.6;
}

.post-popup-content pre {
    background-color: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 12px 0;
}

.post-popup-content pre code {
    background: none;
    padding: 0;
}

/* 弹窗底部 */
.post-popup-footer {
    padding: 0 28px 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.post-popup-button {
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #555;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.post-popup-button:hover {
    background: #fafafa;
    border-color: #ccc;
    color: #000;
}

.post-popup-button:active {
    transform: scale(0.98);
}

.post-popup-button.primary {
    background: #000;
    color: #fff;
    border-color: #000;
}

.post-popup-button.primary:hover {
    background: #333;
    border-color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-popup-container {
        width: 85%;
        max-width: none;
        min-height: 260px;
        max-height: 85vh;
    }       
    
    .post-popup-header {
        padding: 24px 20px 16px;
    }
    
    .post-popup-title {
        font-size: 18px;
    }
    
    .post-popup-content {
        padding: 0 20px 24px;
        font-size: 14px;
    }
    
    .post-popup-footer {
        padding: 0 20px 24px;
    }
}

/* 暗黑模式支持 */
body.dark-mode .post-popup-overlay {
    background: rgba(0, 0, 0, 0.15);
}

body.dark-mode .post-popup-container {
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    border-color: #e8e8e8;
}

body.dark-mode .post-popup-title {
    color: #555;
}

body.dark-mode .post-popup-content {
    color: #555;
}

body.dark-mode .post-popup-content a {
    color: #555;
    border-bottom-color: #ccc;
}

body.dark-mode .post-popup-content a:hover {
    color: #000;
    border-bottom-color: #000;
}

body.dark-mode .post-popup-content code {
    background-color: #f5f5f5;
}

body.dark-mode .post-popup-content pre {
    background-color: #f5f5f5;
}

body.dark-mode .post-popup-button {
    background: #fff;
    color: #555;
    border-color: #e0e0e0;
}

body.dark-mode .post-popup-button:hover {
    background-color: #fafafa;
    border-color: #ccc;
    color: #000;
}

body.dark-mode .post-popup-button.primary {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

body.dark-mode .post-popup-button.primary:hover {
    background-color: #333;
    border-color: #333;
}

/* 滚动条样式 */
.post-popup-content::-webkit-scrollbar {
    width: 6px;
}

.post-popup-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.post-popup-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.post-popup-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

body.dark-mode .post-popup-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

body.dark-mode .post-popup-content::-webkit-scrollbar-thumb {
    background: #444;
}

body.dark-mode .post-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 动画效果 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

