/* ============================================================
   CONTENT PROTECTION — Anti-Copy / Anti-Select / Anti-Print
   Bulls N Bears Trading Guide — All Rights Reserved
   ============================================================ */

/* ── 1. DISABLE TEXT SELECTION (global) ───────────────────── */
body,
.topic-card,
.topic-content,
.content-block,
.hero,
.roadmap,
.level-section,
footer,
nav,
h1, h2, h3, h4, h5, h6,
p, li, td, th, span, figcaption,
.key-concept,
.table-wrap,
.data-table {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow selection in interactive areas (journal, chat, forms) */
input,
textarea,
[contenteditable="true"],
.journal-modal input,
.journal-modal textarea,
.journal-modal select,
.chat-input,
.chat-container input,
.chat-container textarea,
.reg-modal input,
.reg-modal textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ── 2. DISABLE IMAGE INTERACTIONS ───────────────────────── */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Image shield overlay — transparent layer on top of images */
.img-shield {
  position: relative;
  display: inline-block;
  width: 100%;
}

.img-shield-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: transparent;
  cursor: default;
}

/* ── 3. PRINT PROTECTION ─────────────────────────────────── */
@media print {
  /* Hide all content when printing */
  body * {
    visibility: hidden !important;
  }

  /* Show only the copyright notice */
  body::before {
    visibility: visible !important;
    content: "© 2026 Bulls N Bears Trading Guide. All Rights Reserved. This content is protected by copyright law. Unauthorized reproduction, distribution, or transmission is strictly prohibited. This page was printed without authorization.";
    display: block !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #000;
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
    font-family: sans-serif;
    z-index: 999999;
    padding: 60px;
  }

  body::after {
    visibility: visible !important;
    content: "⚠️ PROTECTED CONTENT — DO NOT DISTRIBUTE";
    display: block !important;
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    font-weight: 900;
    color: #ff0000;
    text-align: center;
    z-index: 999999;
    font-family: sans-serif;
  }

  /* Completely blank all pages */
  html {
    background: #fff !important;
  }

  nav, footer, .topic-card, .hero, .roadmap,
  .level-section, .journal-modal, .chat-container,
  .fab-group, .journal-fab-group, img, figure, svg,
  table, canvas, video, audio {
    display: none !important;
  }
}

/* ── 4. WATERMARK OVERLAY ────────────────────────────────── */
.watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
  opacity: 0.025;
}

.watermark-overlay::before {
  content: "© Bulls N Bears Trading Guide — Protected Content — Do Not Copy — © Bulls N Bears Trading Guide — Protected Content — Do Not Copy — © Bulls N Bears Trading Guide — Protected Content — Do Not Copy";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  font-size: 18px;
  font-family: sans-serif;
  font-weight: 700;
  color: #ffffff;
  line-height: 80px;
  letter-spacing: 8px;
  word-spacing: 30px;
  white-space: nowrap;
  transform: rotate(-30deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  background: repeating-linear-gradient(
    -30deg,
    transparent,
    transparent 60px,
    rgba(255,255,255,0.02) 60px,
    rgba(255,255,255,0.02) 61px
  );
}

/* ── 5. PROTECTION NOTICE TOAST ──────────────────────────── */
#protect-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(255, 68, 68, 0.4);
  color: #ff6b6b;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-family: var(--font-body, 'Inter', sans-serif);
  z-index: 99999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,68,68,0.1);
  max-width: 520px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: protectSlideUp 0.4s ease;
}

#protect-notice strong {
  color: #ff4444;
}

@keyframes protectSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ── 6. ANTI-SCREENSHOT VISUAL MARKER ────────────────────── */
/* Subtle copyright visible in screenshots but not distracting */
body::after {
  content: "© Bulls N Bears Trading Guide";
  position: fixed;
  bottom: 4px;
  right: 8px;
  font-size: 9px;
  color: rgba(0, 212, 170, 0.12);
  font-family: var(--font-mono, monospace);
  pointer-events: none;
  z-index: 9997;
  letter-spacing: 0.5px;
}
