/* Security CSS - Anti-Inspection Protection */

/* Disable text selection on sensitive elements */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Apply no-select to entire body by default */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow selection for input fields and text areas */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Disable right-click context menu styling */
.no-context {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide scrollbars to prevent inspection via scrollbar manipulation */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Prevent drag and drop */
* {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Images should not be draggable */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* Disable image context menu */
img::selection {
    background: transparent;
}

/* Prevent text highlighting */
::selection {
    background: var(--accent-green);
    color: white;
}

::-moz-selection {
    background: var(--accent-green);
    color: white;
}

/* Security overlay for dev tools detection */
.security-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-bg);
    z-index: 999999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-family: var(--font-family);
}

.security-overlay.active {
    display: flex;
}

.security-message {
    text-align: center;
    max-width: 600px;
    padding: var(--spacing-2xl);
}

.security-message h1 {
    font-size: var(--font-size-3xl);
    color: var(--warning-color);
    margin-bottom: var(--spacing-lg);
}

.security-message p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.security-icon {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: var(--spacing-lg);
}

/* Blur effect when dev tools detected */
.blur-content {
    filter: blur(10px);
    pointer-events: none;
}

/* Anti-copy protection */
.protected-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Disable print styles */
@media print {
    * {
        display: none !important;
    }
    
    body::before {
        content: "Bu sayfa yazdırılamaz!";
        display: block !important;
        font-size: 24px;
        text-align: center;
        margin-top: 50px;
    }
}

/* Hide elements that might reveal source */
.hide-source {
    display: none !important;
}

/* Obfuscation helpers */
.obfuscated {
    font-family: monospace;
    letter-spacing: 1px;
    word-spacing: 2px;
}

/* Disable F12, Ctrl+Shift+I, Ctrl+U shortcuts visual feedback */
.shortcut-disabled {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Console warning styles */
.console-warning {
    display: none;
}

/* Fake loading screen for protection */
.protection-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-bg);
    z-index: 999998;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.protection-loader.active {
    display: flex;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

/* Anti-debugging styles */
.debug-trap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Disable zoom */
.no-zoom {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

/* Apply no-zoom to body */
body {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

/* Prevent iframe embedding */
.anti-frame {
    display: none;
}

/* Source code protection indicator */
.source-protected::before {
    content: "🔒";
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    opacity: 0.3;
    z-index: 1000;
    pointer-events: none;
}

/* Mobile specific protections */
@media (max-width: 768px) {
    /* Disable long press context menu on mobile */
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Disable zoom on mobile */
    body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* Disable developer tools shortcuts visual feedback */
.dev-tools-blocked {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border: 2px solid var(--warning-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    z-index: 999999;
    display: none;
    text-align: center;
    max-width: 400px;
}

.dev-tools-blocked.show {
    display: block;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.dev-tools-blocked h3 {
    color: var(--warning-color);
    margin-bottom: var(--spacing-md);
}

.dev-tools-blocked p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.dev-tools-blocked button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
}

/* Hide specific elements that might reveal structure */
.hide-on-inspect {
    display: block;
}

.inspect-detected .hide-on-inspect {
    display: none !important;
}

/* Watermark protection */
.watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 999;
    font-family: monospace;
}

/* Anti-screenshot protection (visual noise) */
.screenshot-protection {
    position: relative;
}

.screenshot-protection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 1px,
        rgba(255, 255, 255, 0.01) 1px,
        rgba(255, 255, 255, 0.01) 2px
    );
    pointer-events: none;
    z-index: 1;
}
