/**
 * Anti View Source CSS Protection
 * Menambahkan proteksi visual dan mencegah selection
 */

/* Mencegah text selection */
* {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Izinkan selection untuk input dan textarea */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Mencegah drag and drop */
* {
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
}

/* Mencegah highlight saat double click */
* {
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Overlay peringatan */
#source-protection-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: Arial, sans-serif !important;
}

/* Warning box styling */
.source-warning-box {
    background: #fff !important;
    padding: 30px !important;
    border-radius: 10px !important;
    text-align: center !important;
    max-width: 400px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    animation: warningPulse 2s infinite !important;
}

@keyframes warningPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mencegah print */
@media print {
    * {
        display: none !important;
    }
    
    body::before {
        content: "Printing not allowed!" !important;
        display: block !important;
        font-size: 24px !important;
        text-align: center !important;
        padding: 50px !important;
    }
}

/* Mencegah screenshot dengan CSS */
body {
    -webkit-filter: none !important;
    filter: none !important;
}

/* Tambahan: Mencegah inspect element dengan CSS */
* {
    outline: none !important;
}

/* Mencegah focus outline */
*:focus {
    outline: none !important;
}

/* Tambahan: Mencegah copy dengan CSS */
* {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Mencegah context menu dengan CSS */
* {
    -webkit-context-menu: none !important;
    -moz-context-menu: none !important;
    context-menu: none !important;
}

/* Tambahan: Mencegah developer tools detection */
@media screen and (max-width: 0px) {
    body {
        display: none !important;
    }
}

/* Mencegah viewport manipulation */
@media screen and (max-height: 0px) {
    body {
        display: none !important;
    }
} 