/* Enhanced Milestone Peek CSS - Better Visibility */
/* Created by Cuserob - Visual Creation & Interface Design 🎨✨ */

/* ========================================
   PEEK MODE - MAXIMUM VISIBILITY
   ======================================== */

/* When peeking, make overlay very transparent */
.peek-toggle:checked ~ .milestone-lock-overlay {
  background: rgba(10, 0, 20, 0.2) !important; /* Much more transparent */
  backdrop-filter: none !important; /* NO BLUR! */
  -webkit-backdrop-filter: none !important; /* NO BLUR for Safari/Edge */
  pointer-events: none; /* Allow clicking through to content below */
}

/* Keep the lock content interactive */
.peek-toggle:checked ~ .milestone-lock-overlay .milestone-lock-content {
  pointer-events: all;
  transform: scale(0.6) translateY(-25vh) !important; /* Larger size - was 0.3, now 0.6 */
  opacity: 0.9 !important;
  background: rgba(30, 0, 60, 0.95);
  border: 3px solid #ff00ff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 0 60px rgba(255, 0, 255, 1);
  min-width: 350px;
  max-width: 500px;
}

/* Hide most content when peeking, keep only essential info */
.peek-toggle:checked ~ .milestone-lock-overlay .lock-header,
.peek-toggle:checked ~ .milestone-lock-overlay .lock-info,
.peek-toggle:checked ~ .milestone-lock-overlay .preview-features,
.peek-toggle:checked ~ .milestone-lock-overlay .demo-notice {
  display: none !important;
}

/* Show mini version when peeking */
.peek-toggle:checked ~ .milestone-lock-overlay .milestone-lock-content::before {
  content: '🔒 Milestone Reward - Demo Preview';
  display: block;
  font-size: 1.3rem; /* Bigger text */
  font-weight: 600;
  color: #ff00ff;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
}

/* ========================================
   CLOSE BUTTON
   ======================================== */

.milestone-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 0, 255, 0.2);
  border: 2px solid #ff00ff;
  border-radius: 50%;
  color: #ff00ff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 101;
}

.milestone-close-btn:hover {
  background: #ff00ff;
  color: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
}

/* ========================================
   ENHANCED PREVIEW BACKDROP
   ======================================== */

.peek-toggle:checked ~ .milestone-lock-overlay .preview-backdrop {
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: linear-gradient(135deg, #ff00ff, #ff0080) !important;
  color: #fff !important;
  padding: 1rem 2rem !important;
  border-radius: 30px !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 40px rgba(255, 0, 255, 0.8) !important;
  z-index: 10001 !important;
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  animation: backdrop-pulse 2s ease-in-out infinite !important;
}

.preview-backdrop p {
  margin: 0 !important;
}

@keyframes backdrop-pulse {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
    box-shadow: 0 10px 40px rgba(255, 0, 255, 0.8);
  }
  50% {
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    box-shadow: 0 15px 60px rgba(255, 0, 255, 1);
  }
}

/* ========================================
   BETTER LABEL STYLING
   ======================================== */

.preview-content-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #00ffff, #0099ff);
  border: none;
  color: #000;
  padding: 1rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1rem;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.6);
}

.preview-content-label:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 30px rgba(0, 255, 255, 0.8);
}

/* Make button glow when in peek mode */
.peek-toggle:checked ~ .milestone-lock-overlay .preview-content-label {
  background: linear-gradient(135deg, #ff00ff, #ff0080);
  color: #fff;
  box-shadow: 0 6px 30px rgba(255, 0, 255, 0.8);
}

/* ========================================
   CONTENT VISIBILITY IN PEEK MODE
   ======================================== */

/* Ensure content behind is fully visible - NO BLUR! */
.neural-network-container:has(.peek-toggle:checked) .neural-header,
.neural-network-container:has(.peek-toggle:checked) .neural-nav,
.neural-network-container:has(.peek-toggle:checked) .neural-content,
.quantum-marketplace-container:has(.peek-toggle:checked) .quantum-header,
.quantum-marketplace-container:has(.peek-toggle:checked) .quantum-nav,
.quantum-marketplace-container:has(.peek-toggle:checked) .quantum-content {
  opacity: 1 !important;
  filter: none !important; /* NO BLUR! */
  -webkit-filter: none !important; /* NO BLUR for Safari! */
  backdrop-filter: none !important; /* NO BLUR anywhere! */
  -webkit-backdrop-filter: none !important;
  pointer-events: all !important;
}

/* Extra insurance - remove any blur from parent containers */
.peek-toggle:checked ~ * {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ========================================
   CLOSE FUNCTIONALITY WITH CHECKBOX
   ======================================== */

/* Hide checkbox when close label is clicked */
.close-toggle {
  display: none;
}

.close-toggle:checked ~ .peek-toggle {
  display: none !important;
}

.close-toggle:checked ~ .milestone-lock-overlay {
  display: none !important;
}

/* ========================================
   FLOATING HINT
   ======================================== */

.peek-toggle:checked ~ .milestone-lock-overlay::after {
  content: '✨ This is a demo preview - Full features coming soon! ✨';
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 0, 0.9);
  color: #000;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(255, 255, 0, 0.6);
  z-index: 10002;
  animation: hint-float 3s ease-in-out infinite;
}

@keyframes hint-float {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .peek-toggle:checked ~ .milestone-lock-overlay .milestone-lock-content {
    transform: scale(0.5) translateY(-30vh) !important; /* Larger on mobile too */
    min-width: 280px;
  }
  
  .preview-backdrop {
    font-size: 0.9rem !important;
    padding: 0.8rem 1.5rem !important;
  }
}

/* ========================================
   NO BLUR OVERRIDE - MAXIMUM CLARITY
   ======================================== */

/* Global rule to ensure NO BLUR in peek mode */
body:has(.peek-toggle:checked) * {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Specific overrides for any stubborn blur effects */
.peek-toggle:checked ~ .milestone-lock-overlay,
.peek-toggle:checked ~ .milestone-lock-overlay * {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ========================================
   ANIMATION ENHANCEMENTS
   ======================================== */

/* Smooth transition when entering/exiting peek mode */
.milestone-lock-overlay {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.milestone-lock-content {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add kawaii sparkles when hovering close button */
.milestone-close-btn::after {
  content: '✨';
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 1.2rem;
  opacity: 0;
  transform: scale(0) rotate(0deg);
  transition: all 0.3s ease;
}

.milestone-close-btn:hover::after {
  opacity: 1;
  transform: scale(1) rotate(360deg);
}