/* MacBook Frame Styles - Desktop only */
.macbook-frame-wrapper {
  display: flex;
  width: 100%;
  margin: 0 auto;
  margin-top: -60px;
  position: relative;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* Device with Effects */
.device-with-effects {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1;
  flex-shrink: 0;
}

.bizmic-device-image {
  width: auto;
  height: 240px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  object-fit: contain;
}

/* Light Shining Behind Device */
.device-glow {
  position: absolute;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 200px;
  background: radial-gradient(ellipse at left center, rgba(26, 115, 232, 0.6) 0%, rgba(66, 165, 245, 0.4) 30%, transparent 70%);
  filter: blur(20px);
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
  }
}

/* Bottom Glow Effect Under Device */
.device-bottom-glow {
  position: absolute;
  left: 50%;
  bottom: 200px;
  width: 180px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(26, 115, 232, 0.85) 0%, rgba(66, 165, 245, 0.6) 20%, rgba(100, 181, 246, 0.35) 45%, transparent 70%);
  filter: blur(30px);
  z-index: 0;
  transform: translateX(-50%) translateY(60%);
  animation: bottomGlowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bottomGlowPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateX(-50%) translateY(60%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) translateY(60%) scale(1.15);
  }
}

/* Electric Streamline Effect */
.electric-streamline {
  position: absolute;
  left: calc(100% - 20px);
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 2px;
  z-index: 2;
  pointer-events: none;
}

.streamline-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
}

/* Left side - vibrant blue dashes */
.streamline-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: repeating-linear-gradient(
    to right,
    rgba(26, 115, 232, 1) 0px,
    rgba(26, 115, 232, 1) 10px,
    transparent 10px,
    transparent 20px
  );
  animation: streamFlow 1.5s linear infinite;
}

/* Right side - fading blue dashes */
.streamline-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: repeating-linear-gradient(
    to right,
    rgba(100, 181, 246, 0.7) 0px,
    rgba(100, 181, 246, 0.7) 8px,
    transparent 8px,
    transparent 18px
  );
  background-size: 200% 100%;
  background-position: 0 0;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
  animation: streamFlowRight 1.5s linear infinite;
}

@keyframes streamFlow {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0;
  }
}

@keyframes streamFlowRight {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -40px 0;
  }
}

.streamline-circle {
  position: absolute;
  left: 27%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  background: #1a73e8;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(26, 115, 232, 1), 0 0 32px rgba(26, 115, 232, 0.8), 0 0 48px rgba(26, 115, 232, 0.4);
  animation: circlePulse 1.5s ease-in-out infinite;
  z-index: 3;
}

@keyframes circlePulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.9;
  }
}

.macbook-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.macbook-frame-image {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  position: relative;
  z-index: 1;
}

.macbook-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  /* Adjust these percentages to match the screen area in the MacBook image */
  /* Typical MacBook screen area: top ~8%, left ~5%, right ~5%, bottom ~8% */
  top: 8%;
  left: 5%;
  right: 5%;
  bottom: 8%;
  width: calc(100% - 10%);
  height: calc(100% - 16%);
}

.macbook-screen .gmail-container {
  width: 85%;
  height: 88%;
  max-width: 85%;
  max-height: 88%;
  margin: auto;
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  z-index: 3;
}

/* Hide MacBook frame on device view (mobile) */
@media (max-width: 768px) {
  /* Hide only the MacBook frame image, keep wrapper visible */
  .macbook-frame-image {
    display: none !important;
  }
  
  .macbook-frame {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .macbook-frame-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    flex-direction: column !important;
  }
  
  /* Hide device effects on mobile */
  .device-with-effects {
    display: none !important;
  }
  
  /* Extract and show gmail-container on mobile */
  .macbook-screen {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .macbook-screen .gmail-container {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    display: block !important;
  }
}

/* Small mobile adjustments for border-radius */
@media (max-width: 480px) {
  .macbook-screen .gmail-container {
    border-radius: 14px !important;
  }
}

/* Desktop: Show MacBook frame and position gmail-container inside */
@media (min-width: 769px) {
  .macbook-frame-wrapper {
    display: flex;
  }
  
  .macbook-screen .gmail-container {
    display: block;
  }
}

/* iPad Pro and tablet optimization */
@media (min-width: 769px) and (max-width: 1366px) {
  .macbook-frame-wrapper {
    gap: 30px;
  }
  
  .bizmic-device-image {
    height: 220px;
  }
}

