/**
 * AntiTheft Pro - 防扒站样式表
 * @version 2.0.0
 * 
 * 单独使用此CSS可获得基础保护（无JS检测功能）
 */

/* ========== 基础保护 ========== */

/* 全局禁止选择 */
.at-protected,
.at-protected * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* 输入框例外 */
.at-protected input,
.at-protected textarea,
.at-protected [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* 禁止拖拽 */
.at-protected img,
.at-protected video,
.at-protected audio,
.at-protected canvas,
.at-protected svg,
.at-protected embed,
.at-protected object {
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    pointer-events: none !important;
}

/* 链接允许点击 */
.at-protected a,
.at-protected a * {
    pointer-events: auto !important;
}

/* 按钮允许点击 */
.at-protected button,
.at-protected button * {
    pointer-events: auto !important;
}

/* ========== 打印保护 ========== */

@media print {
    .at-protected,
    .at-protected body {
        display: none !important;
    }
    
    .at-print-blocked::after {
        content: "打印功能已被禁用";
        display: block;
        text-align: center;
        font-size: 24px;
        color: #999;
        padding: 50px;
    }
}

/* ========== 遮罩层样式 ========== */

.at-blocker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2147483647;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.at-blocker.active {
    display: flex !important;
}

.at-blocker-content {
    text-align: center;
    padding: 40px;
    max-width: 90%;
}

.at-blocker-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: at-pulse 2s infinite;
}

.at-blocker-title {
    font-size: 32px;
    margin-bottom: 10px;
    color: #ff3333;
    font-weight: 600;
    line-height: 1.2;
}

.at-blocker-message {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 5px;
    line-height: 1.5;
}

.at-blocker-submessage {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* ========== 右键菜单样式 ========== */

.at-context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 6px 0;
    z-index: 2147483646;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    min-width: 160px;
    animation: at-menu-appear 0.1s ease;
}

.at-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    color: #333;
    transition: all 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.at-menu-item:hover:not(.disabled) {
    background: #f5f5f5;
}

.at-menu-item.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.at-menu-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 6px 0;
}

/* ========== 状态指示器 ========== */

.at-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: "SF Mono", Monaco, monospace;
    font-size: 12px;
    z-index: 2147483645;
    pointer-events: none;
    transition: all 0.3s;
}

.at-status.warning {
    color: #ff3333;
    animation: at-blink 0.5s infinite;
}

/* ========== 动画 ========== */

@keyframes at-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes at-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes at-menu-appear {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes at-fade-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 响应式 ========== */

@media (max-width: 768px) {
    .at-blocker-title {
        font-size: 24px;
    }
    
    .at-blocker-message {
        font-size: 16px;
    }
    
    .at-context-menu {
        font-size: 16px; /* 移动端更大触摸区域 */
    }
    
    .at-menu-item {
        padding: 12px 16px;
    }
}

/* ========== 无障碍 ========== */

@media (prefers-reduced-motion: reduce) {
    .at-blocker-icon,
    .at-status.warning {
        animation: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .at-blocker {
        background: #000;
    }
    
    .at-blocker-title {
        color: #ff0000;
    }
}