/**
 * Uranus Novel Platform - Content Protection Styles
 * Anti-copy, anti-scraping, anti-DevTools CSS protection layer.
 */

/* ============================================================
   Disable selection on reading content
   ============================================================ */
.reading-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    position: relative;
}

/* ============================================================
   Invisible watermark overlay
   ============================================================ */
.content-watermark {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.003;
    font-size: 14px;
    color: #fff;
    transform: rotate(-30deg);
    display: flex;
    flex-wrap: wrap;
    gap: 100px;
    padding: 50px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.content-watermark span {
    white-space: nowrap;
}

/* ============================================================
   DevTools warning overlay
   ============================================================ */
.devtools-warning {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #c9a84c;
    font-size: 1.5rem;
    text-align: center;
    padding: 40px;
    font-family: 'Tajawal', sans-serif;
}

.devtools-warning i {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: pulse-warning 2s infinite;
}

.devtools-warning p {
    color: #888;
    font-size: 1rem;
    margin-top: 15px;
    max-width: 400px;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* When DevTools is detected */
.devtools-detected .devtools-warning {
    display: flex;
}

.devtools-detected .reading-content {
    filter: blur(20px);
    pointer-events: none;
}

/* ============================================================
   Print protection
   ============================================================ */
@media print {
    .reading-content {
        display: none !important;
    }

    .chapter-content-area {
        display: none !important;
    }

    .print-block-msg {
        display: block !important;
        text-align: center;
        font-size: 24px;
        padding: 100px 20px;
        color: #333;
        font-family: 'Tajawal', sans-serif;
    }

    .content-watermark,
    .devtools-warning {
        display: none !important;
    }
}

.print-block-msg {
    display: none;
}

/* ============================================================
   Anti-screenshot - screen capture deterrence
   ============================================================ */
.reading-content::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.003) 2px,
        rgba(255, 255, 255, 0.003) 4px
    );
    z-index: 1;
    border-radius: inherit;
}

/* ============================================================
   Obfuscated text span styling - ensure visual cleanliness
   ============================================================ */
.reading-content span[aria-hidden="true"] {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
