/**
 * 文章阅读限制弹窗样式
 */

/* 弹窗遮罩层 */
.prl-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 显示弹窗 */
.prl-popup-overlay.prl-show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.prl-popup-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

/* 弹窗显示时的动画 */
.prl-popup-overlay.prl-show .prl-popup-container {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.prl-popup-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.prl-popup-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

/* 关闭按钮 */
.prl-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.prl-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 弹窗内容 */
.prl-popup-content {
    padding: 32px 24px;
    text-align: center;
}

/* 弹窗图标 */
.prl-popup-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.prl-popup-icon svg {
    width: 64px;
    height: 64px;
}

/* 弹窗消息 */
.prl-popup-message {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 20px;
}

/* 统计信息 */
.prl-popup-stats {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.prl-stats-text {
    font-size: 14px;
    color: #6b7280;
}

.prl-stats-text strong {
    color: #1f2937;
    font-weight: 600;
}

/* 弹窗底部 */
.prl-popup-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.prl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

/* 主要按钮 */
.prl-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.prl-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* 次要按钮 */
.prl-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.prl-btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .prl-popup-container {
        width: 95%;
        margin: 20px;
    }
    
    .prl-popup-header {
        padding: 20px 20px 12px;
    }
    
    .prl-popup-title {
        font-size: 18px;
    }
    
    .prl-popup-content {
        padding: 24px 20px;
    }
    
    .prl-popup-footer {
        padding: 0 20px 20px;
        flex-direction: column;
    }
    
    .prl-btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes prlFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes prlFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
}

/* 隐藏滚动条但保持滚动功能 */
.prl-popup-container::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* 确保弹窗在所有元素之上 */
.prl-popup-overlay {
    z-index: 999999 !important;
}

/* 防止页面滚动和导航 */
body.prl-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 禁用页面交互 */
body.prl-popup-open * {
    pointer-events: none;
}

/* 只允许弹窗内容交互 */
body.prl-popup-open .prl-popup-overlay,
body.prl-popup-open .prl-popup-overlay * {
    pointer-events: auto;
}

/* 强制弹窗置顶，无法绕过 */
.prl-popup-overlay {
    z-index: 2147483647 !important; /* 最大z-index值 */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.9) !important; /* 更深的背景 */
}

/* 禁用页面选择和复制 */
body.prl-popup-open {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* 隐藏滚动条 */
body.prl-popup-open::-webkit-scrollbar {
    display: none !important;
}

/* 防止通过CSS隐藏弹窗 */
.prl-popup-overlay.prl-show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保弹窗容器始终可见 */
.prl-popup-overlay.prl-show .prl-popup-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
