/* ═══════════════════════════════════════════════════════════
   DURABILITY DEMO STYLES - Mobile-First Design
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   INVISIBILITY SHOWCASE - "Can You Spot the Difference?"
   ═══════════════════════════════════════════════════════════ */

.hp-invisibility-showcase {
  background: var(--bg-card);
  padding: 3rem 1rem;
  position: relative;
  overflow: hidden;
}

.hp-invisibility-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(0, 175, 240, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.invisibility-title {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.invisibility-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.invisibility-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ═══════════════════════════════════════════════════════════
   COMPARISON SLIDER (Before/After)
   ═══════════════════════════════════════════════════════════ */

.comparison-container {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto;
}

.comparison-wrapper {
  position: relative;
  background: var(--bg-main);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.comparison-images {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin: 8px;
  width: calc(100% - 16px);
}

.comparison-img {
  display: block;
  width: 100%;
  height: auto;
}

.comparison-watermarked {
  position: relative;
  z-index: 1;
}

.comparison-original-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 2;
  width: 50%;
}

.comparison-original {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
}

/* Slider Handle - Touch Friendly (min 44px) */
.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 10;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  margin-left: -24px;
}

.comparison-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--primary);
  transform: translateX(-50%);
  box-shadow: 0 0 15px rgba(0, 175, 240, 0.4);
}

.comparison-slider-handle {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 175, 240, 0.3);
  z-index: 11;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comparison-slider-handle:active,
.comparison-slider.active .comparison-slider-handle {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 175, 240, 0.5);
  background: var(--primary);
}

.comparison-slider-handle:active .slider-arrow,
.comparison-slider.active .comparison-slider-handle .slider-arrow {
  color: white;
}

.slider-arrow {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: bold;
  transition: color 0.15s ease;
}

.slider-arrow.left {
  margin-right: 2px;
}

.slider-arrow.right {
  margin-left: 2px;
}

/* Labels */
.comparison-label {
  position: absolute;
  top: 8px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.comparison-label-left {
  left: 8px;
}

.comparison-label-right {
  right: 8px;
}

/* Mobile hint */
.comparison-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 12px;
  animation: pulse-hint 2s ease-in-out infinite;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   REVEAL MESSAGE
   ═══════════════════════════════════════════════════════════ */

.comparison-reveal {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1.5rem 1rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.comparison-reveal .reveal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.comparison-reveal h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.reveal-main {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.reveal-main .highlight {
  background: rgba(0, 175, 240, 0.2);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.reveal-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 550px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

.reveal-continue-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 175, 240, 0.3);
  font-family: inherit;
  min-height: 48px;
}

.reveal-continue-btn:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════
   DURABILITY DEMO SECTION - Mobile First
   ═══════════════════════════════════════════════════════════ */

.hp-demo-interactive {
  background: linear-gradient(135deg, #0A1628 0%, #1a1a2e 100%);
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.demo-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
}

.demo-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.demo-title h2 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.demo-title p {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════
   IMAGE DISPLAY - Clean & Centered
   ═══════════════════════════════════════════════════════════ */

.demo-image-section {
  margin-bottom: 1rem;
}

.demo-image-box {
  background: #151B2E;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-image-box canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   APPLIED EFFECTS BAR
   ═══════════════════════════════════════════════════════════ */

.demo-applied-bar {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#demo-applied-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.demo-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.demo-badge-none {
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   CONTROLS PANEL
   ═══════════════════════════════════════════════════════════ */

.demo-controls {
  background: #151B2E;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════
   SLIDERS - Mobile Optimized
   ═══════════════════════════════════════════════════════════ */

.demo-sliders {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 1rem;
}

.demo-slider-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  align-items: center;
  gap: 12px;
}

.demo-slider-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.slider-icon {
  font-size: 1.1rem;
}

.slider-name {
  font-weight: 500;
}

/* Slider Track & Thumb - Touch Friendly */
.demo-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  background: #334155;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.demo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #00AFF0 0%, #0091EA 100%);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 10px rgba(0, 175, 240, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.demo-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(0, 175, 240, 0.6);
}

.demo-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #00AFF0 0%, #0091EA 100%);
  border-radius: 50%;
  cursor: grab;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 175, 240, 0.4);
}

.demo-slider.active {
  background: linear-gradient(90deg, #00AFF0 0%, #334155 100%);
}

.slider-value {
  color: #00AFF0;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: right;
  font-family: 'SF Mono', 'Monaco', monospace;
}

/* ═══════════════════════════════════════════════════════════
   SECONDARY ACTIONS (Screenshot & Reset)
   ═══════════════════════════════════════════════════════════ */

.demo-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  min-height: 48px;
  border: 1px solid #475569;
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
}

.demo-btn-secondary:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.08);
}

.demo-btn-secondary.active {
  background: rgba(249, 168, 37, 0.15);
  border-color: #F9A825;
  color: #F9A825;
}

.demo-reset-btn {
  border-color: #64748b;
  color: #94a3b8;
}

.demo-reset-btn:active {
  border-color: #94a3b8;
  color: #fff;
}

#screenshot-count:not(:empty)::before {
  content: '(';
}
#screenshot-count:not(:empty)::after {
  content: 'x)';
}

/* ═══════════════════════════════════════════════════════════
   PRIMARY ACTIONS (Check & Destroy)
   ═══════════════════════════════════════════════════════════ */

.demo-primary-action {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
}

.demo-check-btn {
  width: 100%;
  padding: 16px 24px;
  min-height: 56px;
  background: linear-gradient(135deg, #00AFF0 0%, #0088cc 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(0, 175, 240, 0.3);
}

.demo-check-btn:active {
  transform: scale(0.98);
}

.demo-check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   RESULT DISPLAY
   ═══════════════════════════════════════════════════════════ */

#demo-result {
  transition: all 0.3s ease;
}

#demo-result.hidden {
  display: none;
}

/* Success State */
.demo-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid #10b981;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
}

.demo-success-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.demo-success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.demo-success-details {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  text-align: left;
}

.demo-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 10px;
}

.demo-detail-row:last-child {
  border-bottom: none;
}

.demo-detail-row span {
  color: #94a3b8;
  font-size: 0.85rem;
}

.demo-detail-row strong {
  color: #fff;
  font-size: 0.9rem;
  text-align: right;
}

.demo-success-note {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

/* Loading State */
.demo-loading {
  text-align: center;
  padding: 32px;
  color: #94a3b8;
}

.demo-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #334155;
  border-top-color: #00AFF0;
  border-radius: 50%;
  animation: demo-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

/* Error / No Match States */
.demo-error,
.demo-no-match {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
}

.demo-no-match {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.demo-error .demo-icon,
.demo-no-match .demo-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.demo-error .demo-title,
.demo-no-match .demo-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.demo-error p,
.demo-no-match p {
  color: #94a3b8;
  margin: 0;
  font-size: 0.9rem;
}

.demo-error-hint {
  font-size: 0.8rem;
  margin-top: 8px !important;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   TABLET BREAKPOINT (600px+)
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 600px) {
  .hp-invisibility-showcase {
    padding: 4rem 2rem;
  }
  
  .invisibility-title h2 {
    font-size: 2rem;
  }
  
  .invisibility-title p {
    font-size: 1.05rem;
  }
  
  .comparison-container {
    max-width: 550px;
  }
  
  .comparison-images {
    margin: 12px;
    width: calc(100% - 24px);
  }
  
  .comparison-label {
    top: 12px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  
  .comparison-label-left {
    left: 12px;
  }
  
  .comparison-label-right {
    right: 12px;
  }
  
  .comparison-reveal {
    margin-top: 2rem;
    padding: 2rem;
  }
  
  .comparison-reveal h3 {
    font-size: 1.5rem;
  }
  
  .reveal-continue-btn {
    width: auto;
    min-width: 280px;
  }
  
  /* Demo Section */
  .hp-demo-interactive {
    padding: 4rem 0;
  }
  
  .demo-container {
    max-width: 600px;
    padding: 0 2rem;
  }
  
  .demo-title h2 {
    font-size: 2rem;
  }
  
  .demo-image-box {
    padding: 16px;
  }
  
  .demo-controls {
    padding: 1.5rem;
  }
  
  .demo-slider-row {
    grid-template-columns: 100px 1fr 55px;
    gap: 16px;
  }
  
  .demo-slider-label {
    font-size: 0.9rem;
  }
  
  .demo-primary-action {
    flex-direction: row;
    gap: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP BREAKPOINT (900px+)
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 900px) {
  .hp-invisibility-showcase {
    padding: 5rem 2rem;
  }
  
  .invisibility-title h2 {
    font-size: 2.5rem;
  }
  
  .invisibility-title p {
    font-size: 1.15rem;
  }
  
  .comparison-container {
    max-width: 600px;
  }
  
  .comparison-slider-handle {
    width: 48px;
    height: 48px;
  }
  
  .comparison-slider {
    width: 50px;
    margin-left: -25px;
  }
  
  .comparison-slider-handle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 175, 240, 0.5);
    background: var(--primary);
  }
  
  .comparison-slider-handle:hover .slider-arrow {
    color: white;
  }
  
  .comparison-reveal {
    margin-top: 3rem;
    padding: 2.5rem;
  }
  
  .comparison-reveal h3 {
    font-size: 1.75rem;
  }
  
  .reveal-main {
    font-size: 1.1rem;
  }
  
  .reveal-sub {
    font-size: 1rem;
  }
  
  .reveal-continue-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 175, 240, 0.4);
  }
  
  /* Demo Section */
  .hp-demo-interactive {
    padding: 5rem 0;
  }
  
  .demo-container {
    max-width: 700px;
  }
  
  .demo-title h2 {
    font-size: 2.5rem;
  }
  
  .demo-title p {
    font-size: 1.1rem;
  }
  
  .demo-slider-row {
    grid-template-columns: 120px 1fr 60px;
  }
  
  .demo-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 175, 240, 0.6);
  }
  
  .demo-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #00AFF0;
  }
  
  .demo-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 175, 240, 0.4);
  }
  
}
