/* Image Modal Styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.5);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.modal-image-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  min-height: 60vh;
}

.modal-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 0;
}

.modal-info {
  padding: 30px;
  background: white;
  border-top: 1px solid #eee;
}

.modal-info h3 {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
}

.modal-info p {
  margin: 0 0 25px 0;
  color: #666;
  line-height: 1.6;
  font-size: 16px;
}

.modal-actions {
  display: flex;
  justify-content: center;
}

.modal-actions .btn-calculate {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-actions .btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.modal-actions .btn-calculate svg {
  transition: transform 0.3s ease;
}

.modal-actions .btn-calculate:hover svg {
  transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    max-width: 98vw;
    max-height: 98vh;
    margin: 1vh;
    border-radius: 15px;
  }
  
  .modal-info {
    padding: 20px;
  }
  
  .modal-info h3 {
    font-size: 20px;
  }
  
  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
  
  .modal-image-container {
    min-height: 50vh;
  }
  
  .modal-image-container img {
    max-height: 50vh;
  }
  
  .modal-actions .btn-calculate {
    padding: 12px 25px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .modal-info h3 {
    font-size: 18px;
  }
  
  .modal-info p {
    font-size: 15px;
  }
}