/* ===================================
   Fanli OEM Partnership Homepage
   Fullscreen Image Viewer CSS Styles
   =================================== */

/* ===== FULLSCREEN VIEWER STYLES ===== */

/* Fullscreen Viewer Container */
.fanli-fullscreen-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fanli-fullscreen-viewer.fanli-fullscreen-viewer--active {
  display: flex;
  opacity: 1;
}

/* Backdrop */
.fanli-fullscreen-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

/* Container */
.fanli-fullscreen-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Close Button */
.fanli-fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
  backdrop-filter: blur(10px);
}

.fanli-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.fanli-fullscreen-close:active {
  transform: scale(0.95);
}

/* Fullscreen Image */
.fanli-fullscreen-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  cursor: grab;
  transition: transform 0.3s ease;
}

.fanli-fullscreen-image:active {
  cursor: grabbing;
}

/* Image Info */
.fanli-fullscreen-info {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  padding: 12px 24px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  max-width: 80%;
}

.fanli-fullscreen-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animation */
@keyframes fanliFullscreenFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fanliFullscreenFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

.fanli-fullscreen-viewer--active .fanli-fullscreen-image {
  animation: fanliFullscreenFadeIn 0.3s ease;
}

.fanli-fullscreen-viewer--closing .fanli-fullscreen-image {
  animation: fanliFullscreenFadeOut 0.3s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .fanli-fullscreen-container {
    padding: 10px;
  }
  
  .fanli-fullscreen-close {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
  }
  
  .fanli-fullscreen-info {
    bottom: 20px;
    padding: 10px 20px;
    max-width: 90%;
  }
  
  .fanli-fullscreen-title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .fanli-fullscreen-container {
    padding: 5px;
  }
  
  .fanli-fullscreen-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  
  .fanli-fullscreen-info {
    bottom: 15px;
    padding: 8px 16px;
  }
  
  .fanli-fullscreen-title {
    font-size: 14px;
  }
}

/* Prevent body scroll when fullscreen is active */
body.fanli-fullscreen-active {
  overflow: hidden;
}

/* Touch gestures support */
.fanli-fullscreen-image {
  touch-action: pan-x pan-y;
}

/* Loading state */
.fanli-fullscreen-image[src=""] {
  opacity: 0;
}

.fanli-fullscreen-image:not([src=""]) {
  opacity: 1;
  transition: opacity 0.3s ease;
}
