@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap");

.testimonial-scanner-wrapper {
  position: relative;
  width: 100vw;
  height: 600px;
  background: #041f22; /* Deep teal/blue instead of pure black */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-left: calc(-50vw + 50%);
  margin-top: 40px;
  margin-bottom: 40px;
  font-family: "Arial", sans-serif;
}

.scanner-container {
  position: relative;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-stream {
  position: absolute;
  width: 100vw;
  height: 320px;
  display: flex;
  align-items: center;
  overflow: visible;
  z-index: 20;
}

.card-line {
  display: flex;
  align-items: center;
  gap: 60px;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  will-change: transform;
}

.card-line:active, .card-line.dragging {
  cursor: grabbing;
}

.card-wrapper {
  position: relative;
  width: 400px;
  height: 250px;
  flex-shrink: 0;
}

.card {
  position: absolute;
  top: 0;
  left: 0;
  width: 400px;
  height: 250px;
  border-radius: 15px;
  overflow: hidden;
}

/* Redesign for Testimonial Card */
.scanner-review-card {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  color: white;
  z-index: 2;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.scanner-review-card .review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.scanner-review-card .gold-stars {
  color: #fbbf24;
  display: flex;
  gap: 2px;
}

.scanner-review-card .star-filled { fill: #fbbf24; color: #fbbf24; width: 18px; height: 18px; }
.scanner-review-card .star-empty { fill: transparent; color: rgba(255, 255, 255, 0.3); width: 18px; height: 18px; }

.scanner-review-card .card-quote-watermark {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
  font-family: Georgia, serif;
}

.scanner-review-card .review-quote-body {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin: 15px 0;
  flex-grow: 1;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scanner-review-card .review-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scanner-review-card .author-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.scanner-review-card .author-details {
  display: flex;
  flex-direction: column;
}

.scanner-review-card .author-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.scanner-review-card .author-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.card-ascii {
  background: rgba(0, 0, 0, 0.9);
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 400px;
  height: 250px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.5);
}

.ascii-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgba(0, 255, 255, 0.8);
  font-family: "Courier New", monospace;
  font-size: 11px;
  line-height: 13px;
  overflow: hidden;
  white-space: pre;
  clip-path: inset(0 calc(100% - var(--clip-left, 0%)) 0 0);
  animation: glitch 0.1s infinite linear alternate-reverse;
  margin: 0;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  box-sizing: border-box;
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.4) 80%,
    rgba(0, 0, 0, 0.2) 100%
  );
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.4) 80%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

@keyframes glitch {
  0% { opacity: 1; }
  15% { opacity: 0.9; }
  16% { opacity: 1; }
  49% { opacity: 0.8; }
  50% { opacity: 1; }
  99% { opacity: 0.9; }
  100% { opacity: 1; }
}

.scanner-beam {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 400px;
  border-radius: 30px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 255, 255, 0.8),
    rgba(0, 255, 255, 1),
    rgba(0, 255, 255, 0.8),
    transparent
  );
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.4);
  animation: scanPulse 2s ease-in-out infinite alternate;
  z-index: 10;
}

@keyframes scanPulse {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scaleY(1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scaleY(1.1);
  }
}

.card-normal {
  clip-path: inset(0 0 0 var(--clip-right, 0%));
}

.card-ascii {
  clip-path: inset(0 calc(100% - var(--clip-left, 0%)) 0 0);
}

.scan-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 255, 0.4),
    transparent
  );
  animation: scanEffect 0.6s ease-out;
  pointer-events: none;
  z-index: 5;
}

@keyframes scanEffect {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

#particleCanvas {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100vw;
  height: 250px;
  z-index: 0;
  pointer-events: none;
}

#scannerCanvas {
  position: absolute;
  top: 50%;
  left: -3px;
  transform: translateY(-50%);
  width: 100vw;
  height: 400px;
  z-index: 15;
  pointer-events: none;
}

@media (max-width: 992px) {
    .scanner-beam,
    #scannerCanvas,
    #particleCanvas,
    .card-ascii {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    .card-normal {
        clip-path: none !important;
        -webkit-clip-path: none !important;
    }
}
