/* ShareResource组件样式 */

.share-modal-body {
  padding: 20px;
}

.share-preview-container {
  width: 100%;
  /* 调整为与生成图片相同的比例 (600:960 = 0.625) */
  padding-top: 160%;
  position: relative;
  margin-bottom: 15px;
  background-color: #ffffff; /* 统一为白色背景 */
  border-radius: 8px;
  overflow: hidden;
  /* 添加轻微阴影以区分图片与背景 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.loading-container,
.share-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.share-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(58, 134, 255, 0.3);
  border-top-color: #3a86ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.share-info {
  text-align: center;
  padding: 5px 0; /* 减小内边距 */
}

.share-success-message {
  color: #10b981;
  margin: 0;
  font-weight: bold;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* 增加按钮间距 */
  justify-content: center;
}

.btn-custom {
  padding: 10px 20px; /* 增加按钮内边距 */
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #3a86ff;
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-outline {
  background-color: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-outline:hover {
  background-color: #f1f5f9;
}

.btn-custom:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-container {
  color: #ef4444;
  text-align: center;
  padding: 20px;
}

@media (max-width: 576px) {
  .share-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-custom {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px; /* 减小字体大小 */
  }
  
  .share-preview-container {
    padding-top: 160%; /* 保持与生成图片相同的比例 */
    margin-bottom: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  }
  
  .share-modal-body {
    padding: 15px 10px;
  }
  
  .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
  }
  
  .loading-container p {
    font-size: 14px;
  }
  
  .error-container {
    padding: 15px;
  }
}

/* 添加更小屏幕的特殊处理 */
@media (max-width: 360px) {
  .share-modal-body {
    padding: 12px 8px;
  }
  
  .btn-custom {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .share-preview-container {
    margin-bottom: 8px;
  }
  
  .spinner {
    width: 28px;
    height: 28px;
  }
  
  .loading-container p {
    font-size: 13px;
  }
} 