/* Attack Surface Tour Styles */

/* Main Preview Container */
.attack-surface-preview-container {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #0b0d10;
  border-radius: 10px;
  overflow: hidden;
}

.attack-surface-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.attack-surface-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.attack-surface-start-button {
  padding: 16px 40px;
  background-color: #b02f34;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.attack-surface-start-button:hover {
  background-color: #c0353a;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(176, 47, 52, 0.3);
}

/* Modal */
.attack-surface-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0f0f12;
  z-index: 1000;
  animation: attackSurfaceModalBackdropFadeIn 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  overflow: hidden;
}

.attack-surface-modal-backdrop.closing {
  animation: attackSurfaceModalBackdropFadeOut 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.attack-surface-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #0b0d10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  animation: attackSurfaceModalContentSlideIn 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.attack-surface-modal-content.closing {
  animation: attackSurfaceModalContentSlideOut 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.attack-surface-modal-image-wrapper {
  position: relative;
  max-width: 95vw;
  max-height: calc(100vh - 100px);
  width: auto;
  height: auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attack-surface-modal-image {
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  display: block;
}

/* Overlay System */
.attack-surface-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.attack-surface-overlay-left {
  position: absolute;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.attack-surface-overlay-right {
  position: absolute;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.attack-surface-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: all 500ms ease-in-out;
  opacity: 1;
}

.attack-surface-overlay-transitioning {
  opacity: 0.3;
}

.attack-surface-highlight-border {
  position: absolute;
  border: 2px solid #b02f34;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(176, 47, 52, 0.3);
  transition: all 500ms ease-in-out;
  opacity: 1;
  transform: scale(1);
}

.attack-surface-highlight-border.transitioning {
  opacity: 0.5;
  transform: scale(0.98);
}

/* Progress Bar */
.attack-surface-tour-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 2px;
  z-index: 1002;
  backdrop-filter: blur(10px);
  animation: attackSurfaceProgressBarFadeIn 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.attack-surface-tour-progress-bar.closing {
  animation: attackSurfaceProgressBarFadeOut 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.attack-surface-progress-segment {
  flex: 1;
  position: relative;
  cursor: pointer;
  overflow: visible;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(255, 255, 255, 0.1);
}

.attack-surface-progress-segment:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.attack-surface-progress-segment-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #b02f34 0%, #d24449 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.attack-surface-progress-segment.completed .attack-surface-progress-segment-fill {
  transform: scaleX(1);
}

.attack-surface-progress-segment.active {
  background-color: rgba(176, 47, 52, 0.2);
}

.attack-surface-progress-segment.active .attack-surface-progress-segment-fill {
  transform: scaleX(1);
  animation: attackSurfaceProgressPulse 2s infinite;
}

.attack-surface-progress-step-number {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #2a2f39;
  border: 2px solid #262a33;
  color: #b9bfca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1003;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.attack-surface-progress-segment:hover .attack-surface-progress-step-number {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.attack-surface-progress-step-number.completed {
  background-color: #b02f34;
  border-color: #8e262a;
  color: white;
  box-shadow: 0 2px 8px rgba(176, 47, 52, 0.4);
}

.attack-surface-progress-step-number.active {
  background: linear-gradient(135deg, #b02f34 0%, #d24449 100%);
  border-color: #d24449;
  color: white;
  box-shadow: 0 4px 16px rgba(176, 47, 52, 0.6);
  animation: attackSurfaceStepNumberPulse 2s infinite;
}

@keyframes attackSurfaceProgressPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes attackSurfaceStepNumberPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 4px 16px rgba(176, 47, 52, 0.6);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(176, 47, 52, 0.8);
  }
}

@keyframes attackSurfaceProgressBarFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes attackSurfaceProgressBarFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Animations */
@keyframes attackSurfaceModalBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes attackSurfaceModalBackdropFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes attackSurfaceModalContentSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes attackSurfaceModalContentSlideOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .attack-surface-preview-container {
    aspect-ratio: 4 / 3;
  }
  
  .attack-surface-start-button {
    padding: 14px 36px;
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .attack-surface-preview-container {
    aspect-ratio: 3 / 2;
  }
  
  .attack-surface-start-button {
    padding: 12px 32px;
    font-size: 1rem;
  }
}

/* Attack Surface Step Popup - Animated */
.attack-surface-step-popup {
  position: absolute;
  background-color: #111319;
  border: 1px solid #262a33;
  border-radius: 12px;
  padding: 20px;
  color: #f1f2f5;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(176, 47, 52, 0.3);
  min-width: 300px;
  max-width: 400px;
  animation: attackSurfacePopupSlideIn 600ms ease-out forwards;
  transition: all 500ms ease-in-out;
}

.attack-surface-step-popup.transitioning {
  opacity: 0.3;
  transition: all 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.attack-surface-step-popup.transitioning.transition-next {
  transform: translateX(80px) scale(0.95);
}

.attack-surface-step-popup.transitioning.transition-prev {
  transform: translateX(-80px) scale(0.95);
}

.attack-surface-step-popup.closing {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Popup Animated Border */
.attack-surface-popup-animated-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  background: linear-gradient(45deg, rgba(176, 47, 52, 0.3), rgba(176, 47, 52, 0.1));
  background-clip: border-box;
  animation: pulseGlow 2s infinite;
  transition: all 400ms ease-in-out;
  pointer-events: none;
}

/* Quit Button */
.attack-surface-quit-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #262a33;
  border-radius: 50%;
  color: #b9bfca;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  z-index: 20;
  transition: all 200ms ease;
}

.attack-surface-quit-button:hover {
  background: rgba(176, 47, 52, 0.8);
  color: white;
  transform: scale(1.1);
}

/* Popup Content */
.attack-surface-popup-content {
  position: relative;
  z-index: 10;
  transition: all 400ms ease-in-out;
}

/* Animations */
@keyframes attackSurfacePopupSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(176, 47, 52, 0.4); }
  50% { box-shadow: 0 0 8px 4px rgba(176, 47, 52, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(176, 47, 52, 0.4); }
}

