/* Core Anti-Copy and Anti-Selection */
:root {
    --security-blur-radius: 20px;
    --watermark-opacity: 0.04;
}

body {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

/* Images and Links non-draggable */
img, a {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

/* Watermark Overlay System */
#security-watermark-container {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 999999;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    opacity: var(--watermark-opacity);
    mix-blend-mode: multiply; /* Make it blend to deter simple contrast removal */
    transform: rotate(-15deg);
}

.security-watermark {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    padding: 40px;
    white-space: nowrap;
    text-align: center;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5); /* Anti-removal shadow */
    transition: transform 1s ease-in-out;
}

/* Dark mode adjustment for watermark */
@media (prefers-color-scheme: dark) {
    #security-watermark-container {
        mix-blend-mode: screen;
    }
    .security-watermark {
        color: #fff;
        text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
    }
}

/* Blurring Protection (Tab Switch / DevTools) */
body.security-blur-active > *:not(#security-overlay) {
    filter: blur(var(--security-blur-radius)) grayscale(100%);
    opacity: 0.2;
    transition: filter 0.1s, opacity 0.1s;
    pointer-events: none !important;
}

/* Security Overlay (DevTools / Mobile Block / Visibility Block) */
#security-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: #fff;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    display: none;
}

#security-overlay.active {
    display: flex;
}

#security-overlay h2 {
    color: #ff3333;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

#security-overlay p {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    max-width: 600px;
}

/* Print Protection */
@media print {
    body {
        display: none !important;
    }
}
