.before-after {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.before-after-frame {
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  contain: content;
}

/* Browser Chrome */
.before-after-browser-chrome {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #2d2d44;
}

.before-after-browser-dots {
  display: flex;
  gap: 6px;
}

.before-after-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.before-after-dot--red {
  background: #ff5f57;
}

.before-after-dot--yellow {
  background: #febc2e;
}

.before-after-dot--green {
  background: #28c840;
}

.before-after-browser-url {
  flex: 1;
  background: #1a1a2e;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.875rem;
  font-family: monospace;
}

/* Content Area */
.before-after-content {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f8fafc;
  overflow: hidden;
}

#json-formatter-pro .before-after-state {
  padding: 0.7rem;
  color: var(--color-text-primary);
  font-weight: 700;
  text-align: left;
}

.before-after-state {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

.before-after-state pre {
  margin: 0;
}

.before-after-state--hidden {
  opacity: 0;
  pointer-events: none;
}

/* Shield Animation */
.before-after-shield {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(234, 88, 12, 0.1);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  pointer-events: none;
  will-change: opacity, transform;
}

.before-after-shield--active {
  opacity: 1;
  transform: scale(1);
}

.before-after-shield-icon {
  width: 80px;
  height: 80px;
  animation: shield-pulse 0.5s ease;
  will-change: transform;
}

@keyframes shield-pulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Status Label */
.before-after-label {
  padding: 0.75rem 1rem;
  background: #2d2d44;
  text-align: center;
}

.before-after-status {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.before-after-status--exposed {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.before-after-status--protected {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

/* Indicators */
.before-after-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.before-after-indicator {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

.before-after-indicator:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.before-after-indicator--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.mock-ui--hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .before-after-state,
  .before-after-shield,
  .before-after-shield-icon {
    transition: none !important;
    animation: none !important;
  }
}

/* Mock YouTube */
.mock-youtube {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.5rem;
  height: 100%;
  padding: 0.5rem;
  background: #0f0f0f;
}

.mock-youtube-video {
  position: relative;
  background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-youtube-video--clean {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
}

.mock-youtube-play-icon {
  opacity: 0.9;
}

.mock-youtube-ad-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.mock-youtube-ad-badge {
  background: #f9a825;
  color: #000;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.mock-youtube-ad-skip {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.mock-youtube-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-youtube-sidebar-ad {
  background: #2a2a2a;
  border-radius: 4px;
  padding: 0.5rem;
  flex: 1;
}

.mock-youtube-rec {
  background: #2a2a2a;
  border-radius: 4px;
  flex: 1;
}

.mock-ad-banner {
  background: #f9a825;
  color: #000;
  font-size: 0.625rem;
  padding: 0.125rem 0.25rem;
  border-radius: 2px;
  display: inline-block;
  font-weight: 600;
}

/* Mock News Site */
.mock-news {
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
}

.mock-news-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.mock-news-logo {
  width: 80px;
  height: 20px;
  background: #1e293b;
  border-radius: 4px;
}

.mock-news-nav {
  flex: 1;
  height: 8px;
  background: #e5e5e5;
  border-radius: 4px;
}

.mock-news-banner-ad {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 1rem;
  text-align: center;
  border: 2px dashed #f59e0b;
}

.mock-news-banner-ad span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400e;
}

.mock-news-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  padding: 1rem;
  flex: 1;
}

.mock-news-content--clean {
  grid-template-columns: 1fr;
}

.mock-news-article {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-news-article--full {
  max-width: 100%;
}

.mock-news-headline {
  height: 16px;
  background: #1e293b;
  border-radius: 4px;
  width: 80%;
}

.mock-news-text {
  height: 8px;
  background: #e5e5e5;
  border-radius: 4px;
}

.mock-news-text:nth-child(odd) {
  width: 100%;
}

.mock-news-text:nth-child(even) {
  width: 90%;
}

.mock-news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-news-sidebar-ad {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px dashed #ef4444;
  border-radius: 4px;
  padding: 1.5rem 0.5rem;
  text-align: center;
  flex: 1;
}

.mock-news-sidebar-ad span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b91c1c;
}

/* Mock Shopping Site */
.mock-shopping {
  height: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.mock-shopping-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: #0f172a;
}

.mock-shopping-logo {
  width: 60px;
  height: 18px;
  background: #f97316;
  border-radius: 4px;
}

.mock-shopping-search {
  flex: 1;
  height: 24px;
  background: white;
  border-radius: 4px;
}

.mock-shopping-banner-ad {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 0.75rem;
  text-align: center;
  border: 2px dashed #f59e0b;
}

.mock-shopping-banner-ad span {
  font-size: 0.625rem;
  font-weight: 700;
  color: #92400e;
}

.mock-shopping-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  flex: 1;
}

.mock-shopping-content--clean {
  padding-top: 1rem;
}

.mock-shopping-product {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid #e5e5e5;
}

.mock-shopping-product--sponsored {
  border-color: #f59e0b;
  background: #fffbeb;
}

.mock-shopping-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #f59e0b;
  color: #000;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.125rem 0.25rem;
  border-radius: 2px;
}

.mock-shopping-image {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 4px;
  flex: 1;
  min-height: 40px;
}

.mock-shopping-price {
  height: 10px;
  background: #1e293b;
  border-radius: 4px;
  width: 60%;
}

/* Mock Social Media Site */
.mock-social {
  height: 100%;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
}

.mock-social-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: #1877f2;
}

.mock-social-logo {
  width: 28px;
  height: 28px;
  background: white;
  border-radius: 50%;
}

.mock-social-nav {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 18px;
}

.mock-social-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  flex: 1;
}

.mock-social-content--clean {
  grid-template-columns: 1fr;
  max-width: 300px;
  margin: 0 auto;
}

.mock-social-post {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-social-post--sponsored {
  border: 2px dashed #f59e0b;
  background: #fffbeb;
}

.mock-social-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #f59e0b;
  color: #000;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
}

.mock-social-post-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 20px;
  background: #e5e5e5;
  border-radius: 10px;
  width: 70%;
}

.mock-social-post-content {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 4px;
  flex: 1;
  min-height: 30px;
}

.mock-social-post-ad {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 4px;
  flex: 1;
  min-height: 40px;
  border: 1px dashed #f59e0b;
}

.mock-social-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-social-sidebar-ad {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px dashed #ef4444;
  border-radius: 8px;
  padding: 1.5rem 0.5rem;
  text-align: center;
  flex: 1;
}

.mock-social-sidebar-ad span {
  font-size: 0.625rem;
  font-weight: 700;
  color: #b91c1c;
}

.before-after-caption {
  text-align: center;
  font-size: 1rem;
  color: var(--lightest-fuchsia, #fff);
  margin-top: 0.5rem;
  font-style: italic;
}
/* Responsive */
@media (max-width: 768px) {
  .before-after {
    max-width: 100%;
  }

  .before-after-content {
    aspect-ratio: 4 / 3;
  }

  .mock-youtube {
    grid-template-columns: 1fr;
  }

  .mock-youtube-sidebar {
    display: none;
  }

  .mock-news-content {
    grid-template-columns: 1fr;
  }

  .mock-news-sidebar {
    display: none;
  }

  .mock-shopping-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .mock-social-content {
    grid-template-columns: 1fr;
  }

  .mock-social-sidebar {
    display: none;
  }
}
