/**
 * 安全内容链接保护器 - 样式表
 */

/* 遮罩层 */
.slp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slp-overlay.slp-show {
    opacity: 1;
}

/* 对话框容器 */
.slp-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    opacity: 0;
    transition: all 0.3s ease;
}

.slp-dialog.slp-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 对话框头部 */
.slp-dialog-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slp-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.slp-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.slp-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* 对话框主体 */
.slp-dialog-body {
    padding: 20px;
}

.slp-dialog-body p {
    margin: 0 0 10px;
    font-size: 15px;
    color: #555;
}

.slp-url {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    word-break: break-all;
    font-size: 14px;
    color: #007bff;
    font-family: monospace;
    max-height: 150px;
    overflow-y: auto;
}

/* 对话框底部 */
.slp-dialog-footer {
    padding: 15px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 按钮样式 */
.slp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.slp-btn-cancel {
    background-color: #f5f5f5;
    color: #333;
}

.slp-btn-cancel:hover {
    background-color: #e5e5e5;
}

.slp-btn-confirm {
    background-color: #007bff;
    color: #ffffff;
}

.slp-btn-confirm:hover {
    background-color: #0056b3;
}

.slp-btn:active {
    transform: scale(0.98);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .slp-dialog {
        width: 95%;
        max-width: none;
    }
    
    .slp-dialog-header h3 {
        font-size: 16px;
    }
    
    .slp-dialog-body p {
        font-size: 14px;
    }
    
    .slp-url {
        font-size: 12px;
        padding: 10px;
    }
    
    .slp-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* 滚动条美化（可选） */
.slp-url::-webkit-scrollbar {
    width: 6px;
}

.slp-url::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.slp-url::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.slp-url::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 安全警告样式 */
.slp-security-warning {
    margin-top: 15px;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
}

.slp-warning-high {
    background-color: #fff5f5;
    border-left-color: #dc3545;
}

.slp-warning-medium {
    background-color: #fff8e1;
    border-left-color: #ffc107;
}

.slp-warning-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 15px;
}

.slp-warning-icon {
    font-size: 20px;
    line-height: 1;
}

.slp-warning-high .slp-warning-header {
    color: #dc3545;
}

.slp-warning-medium .slp-warning-header {
    color: #f57c00;
}

.slp-warning-content {
    margin-left: 28px;
}

.slp-risk-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.slp-risk-item:last-child {
    margin-bottom: 0;
}

.slp-risk-bullet {
    font-weight: bold;
    flex-shrink: 0;
}

.slp-risk-high {
    color: #c62828;
}

.slp-risk-medium {
    color: #f57c00;
}

.slp-risk-low {
    color: #7b7b7b;
}

/* 外部链接提示 */
.slp-external-notice {
    margin-top: 12px;
    padding: 12px;
    background-color: #e3f2fd;
    border-radius: 4px;
    border-left: 3px solid #2196f3;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #1565c0;
    line-height: 1.5;
}

.slp-external-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

/* 危险对话框样式 */
.slp-dialog-danger .slp-dialog-header {
    background-color: #fff5f5;
    border-bottom-color: #ffcdd2;
}

.slp-dialog-danger .slp-dialog-header h3 {
    color: #c62828;
}

.slp-dialog-danger .slp-btn-confirm {
    background-color: #dc3545;
}

.slp-dialog-danger .slp-btn-confirm:hover {
    background-color: #c82333;
}

/* 警告对话框样式 */
.slp-dialog-warning .slp-dialog-header {
    background-color: #fffbf0;
    border-bottom-color: #ffe0b2;
}

.slp-dialog-warning .slp-dialog-header h3 {
    color: #f57c00;
}

.slp-dialog-warning .slp-btn-confirm {
    background-color: #ff9800;
}

.slp-dialog-warning .slp-btn-confirm:hover {
    background-color: #f57c00;
}

/* 响应式 - 安全警告 */
@media (max-width: 600px) {
    .slp-security-warning {
        padding: 12px;
    }
    
    .slp-warning-header {
        font-size: 14px;
    }
    
    .slp-warning-icon {
        font-size: 18px;
    }
    
    .slp-risk-item {
        font-size: 12px;
    }
    
    .slp-warning-content {
        margin-left: 24px;
    }
    
    .slp-external-notice {
        font-size: 12px;
        padding: 10px;
    }
}

/* 滑动验证模块 */
.slp-slider-container {
    margin: 15px 0;
}

.slp-slider-track {
    position: relative;
    width: 100%;
    height: 40px;
    background: #f5f5f5;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.slp-slider-bg {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #e8f5e9;
    transition: width 0.1s ease;
}

.slp-slider-text {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
    user-select: none;
    pointer-events: none;
}

.slp-slider-text.slp-completed {
    color: #4caf50;
}

.slp-slider-button {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 40px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.slp-slider-button:active {
    cursor: grabbing;
    background: #fafafa;
}

.slp-slider-button::before {
    content: '→';
    font-size: 22px;
    color: #666;
    font-weight: normal;
}

.slp-slider-button.slp-completed::before {
    content: '✓';
    font-size: 20px;
    color: #4caf50;
    font-weight: bold;
}

.slp-slider-button.slp-completed {
    cursor: default;
    background: #fff;
}

/* 确认按钮禁用状态 */
.slp-btn-confirm:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.slp-btn-confirm:disabled:hover {
    background-color: #ccc;
}

/* 滑动成功动画 */
@keyframes slp-success-pulse {
    0%, 100% {
        background: #e8f5e9;
    }
    50% {
        background: #c8e6c9;
    }
}

.slp-slider-bg.slp-success {
    animation: slp-success-pulse 0.5s ease;
}

/* 响应式 - 滑动验证 */
@media (max-width: 600px) {
    .slp-slider-track {
        height: 40px;
    }
    
    .slp-slider-button {
        width: 45px;
        height: 40px;
    }
    
    .slp-slider-text {
        font-size: 13px;
    }
}


